Jump to content


Photo

Just need one more step for website


  • Please log in to reply
4 replies to this topic

#1 eaglejazz

eaglejazz
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 07 October 2006 - 11:32 PM

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

#2 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 07 October 2006 - 11:46 PM

umm you need to be more specific what exactly are you looking for

#3 eaglejazz

eaglejazz
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 07 October 2006 - 11:55 PM

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.


      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;
     

Dave

#4 JasonLewis

JasonLewis
  • Members
  • PipPipPip
  • Advanced Member
  • 3,351 posts
  • LocationVictoria, Australia

Posted 08 October 2006 - 01:45 AM

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???
Good luck with your coding.
Jason / ProjectFear / Jaysonic

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 October 2006 - 12:06 PM

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:
$display .= '<li><a href="YOUR_URL_HERE"><img src="images/navigation.gif" border="0" /></a></li>';





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users