how do i do this on php?

  • Thread starter Thread starter hitsandturnkey
  • Start date Start date
H

hitsandturnkey

Guest
i want an image to link to index.php, how do i do this?

example, i have index.php. then i have music.php. i have an image on music.php and when people clicks it, i want it to go to index.php. what is the code for this? thanks.
what if the music.php is on a different folder. let say the folder is music. then i want the image to go to index.php - the main page
 
<a href="index.php"><img src="yourimagehere" /></a>

Basically an <img> tag inside an <a href>.
 
You would use the print command:

<?php
print "<a href=\"index.php\"><img src=\"yourimagehere\" /></a>";
?>
 
Back
Top