Jump to content

Switch Question


gmz1023

Recommended Posts

Okay. Hi y'all i'm rather new to PHP so please excuse my stupidity.I'm currently working with a Switch and i was wondering how to--if possible at all--add a second variable into the same page. for instanceI want to be able to type this into my browser:www.mysite.com/index.php?scs=blahand get a certain section of my site. and likewise i woudl like to type:www.mysite.com/index.php?atp=blahand get a different part. I've already got both variables set up but the problem is i have a Default set up on the first variable that needs to stay. the switch code looks like this

$scs = $_GET['scs'];@include('pt1.php');switch($scs){default:@include('vm9.php');break;case vstr:@include('vst/v1.php');break;}$atp = $_GET['atp'];switch($atp){    case credits:    @include('atp/credits.php');    break;}

thanks in advance for the help.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...