Jump to content

Archived

This topic is now archived and is closed to further replies.

eaglejazz

Just need one more step for website

Recommended Posts

I am still learning Php and therefore need your help!

I want one php file that displays a different picture for 5-7 web pages. I was just wondering the code that i need to do this? Any help would be greatly appreciated!

Dave

Share this post


Link to post
Share on other sites
I need something like this...but this is for for the sublinks...and i want to have something like this for the images to be linked to different pages. For example, the first line the $display <li><img src="images/navigation.gif" /></li>'; shows this for all the pages but i want it images to be linked to a individual pages as I want it to.


[code]      case 'why.php':
  $display = '<ul id="why">';
          $display .= '<li><img src="images/navigation.gif" /></li>';
          $display .= '<li><a href="index.php?file=why.php">Why</a></li>';
          $display .= '<li><a href="index.php?file=about.php">About Us</a></li>';
          $display .= '<li><a href="index.php?file=where.php">Where</a></li>';
          $display .= '</ul>';
          echo $display;
      break;
      [/code]

Dave

Share this post


Link to post
Share on other sites
that still didnt really make sense to me... or its just that i didnt get enough sleep. i think your saying you want navigation.gif different for each file???

Share this post


Link to post
Share on other sites
If you want the image to be a link then wrap an anchor tag around it like you have done with the your text links:
[code=php:0]$display .= '<li><a href="YOUR_URL_HERE"><img src="images/navigation.gif" border="0" /></a></li>';[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.