how do i do this on index.php

Discussion in 'Programming' started by aaronsunkist, Feb 22, 2009.

  1. #1
    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.
     
    aaronsunkist, Feb 22, 2009 IP
  2. bl4ckwolf

    bl4ckwolf Active Member

    Messages:
    216
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    a simple <a href> on the image would do the trick
     
    bl4ckwolf, Feb 22, 2009 IP
  3. NFreak

    NFreak Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <a href=index.php><img src=image.gif></a>

    It is done the same way you would make any other link, just with an image between the tags. :)

    Hope that helps.
     
    NFreak, Feb 22, 2009 IP
  4. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #4
    <a href="index.php"><img src="yourimage.png" border="0"></a> // HTML
    <?php echo "<a href=index.php><img src=yourimage.png border=0></a>"; ?> // PHP
    PHP:
     
    ActiveFrost, Feb 22, 2009 IP