Page 1 of 1
i need help with the something.php?something
Posted: Thu May 22, 2003 7:45 pm
by stonerifik
hey all im new to the whole php thing, but i got the basic idea down
so yeah i have my site and i want to do a page called releases.php
and in that page i want to have section : trainers, tutorials, misc.
i want the links to be releases.php?trainers, and so forth... i dont know what this is called, that is why i am posting a new topic... if anybody could help me with code that would make me able to do this things it would be greatly appriciated. thanks
stonerifik
Posted: Thu May 22, 2003 8:49 pm
by Eugene
I am not a PHP guru, but this is the way I ll go about doing this (there could be a better way)
your links should actually be:
and then in your releases.php, you should have something like this:
Code: Select all
if (!isset($_GET['link']))
{
//link not specified, display default page
print("html.....");
}
else
{
//variable $link present in URL, retrieve it
$link_to_display = $_GET['link'];
//now according to $link_to_display, chose which html to display
if ($link_to_display == "trainers")
{
//print hmtl for trainers
}
elseif ($link_to_display == "misc")
{
//print html for misc
}
}
?>
Hope this helps
Killa Thrilla
this will help you and show you fully how to do this
Posted: Thu May 22, 2003 9:08 pm
by metalhardscripts
http://www.everything.32k.org/news.php click link php tutorial on how to do what ya just asked if you need anymore help please email me with any Q at all and i will help ya out

Posted: Thu May 22, 2003 9:27 pm
by stonerifik
hmmm ok thank you both, ill make sure to try this out when i get home

Posted: Tue May 27, 2003 10:36 pm
by infolock
well it's a good thing i searched for this topic, or i would have asked the same question

Posted: Wed May 28, 2003 4:17 am
by sleepingdanny
You can just use this:
Code: Select all
<?php
switch($page){
case "trainers":
print "content";
break;
case "tutorials":
print "content";
break;
// and so on...
?>