Jump to content


Photo

How to get pick the right image from a folder.


  • Please log in to reply
1 reply to this topic

#1 kee1108

kee1108
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 24 August 2006 - 03:34 PM

Hi everyone,

I just need some help, I want to know how to get a specific image from a local folder.  I dont' mind one image, but if I have 32 images which is correspond to 32 sport teams, how can I make the code so that it will pick the right image correspond to the team and I only have 1 team.php setup.

Thanks for any help.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 24 August 2006 - 03:39 PM

You would pass the team name through the url. eg;

http://yousite/team.php?t=rangers

Then within team.php you can retrieve the tema name using....

$team = $_GET['t'];

Based on $team you can now retrieve your image and any other relevent data.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users