url variables in php??

forcer

OSNN Senior Addict
Joined
18 Oct 2002
Messages
413
i need to work something out for my site.

i have looked at tutorials online but they go over board for the simplicity i need.

for example, i have a page artists.php

this page will have list of artists

example,

Trancemaster
Willmsjay
Jobro
Guyver
Airgate
ect...

then say some1 clicks Jobro, the link will then display:


artists.php?artist=jobro

and the jobro page will load

is there any simple way of working this out because most tutorials just baffle me
 
Something like this should do the job :)
Code:
<?php
switch ($artist) {
case Trancemaster:
print "trancemasters info here";
break;
case Willmsjay:
print "Willmsjay info here";
break;
case Jobro:
print "Jobro info";
break;
//etc
default:
print "Invalid Artist Specified, please go to the <a href=\"index.php\">index page</a> and try again";
}
?>
 
cool thanx that works. 1 more question though.

what will the link be:

PHP:
<p><a href="artists.php?artist=Trancemaster">Trancemaster</a></p>

???? or will it be different?
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back