gmz1023 Posted January 1, 2010 Share Posted January 1, 2010 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 More sharing options...
Guest FirefoxRocks Posted January 2, 2010 Share Posted January 2, 2010 Do you mean:http://example.com/index.php?scs=blah&atp=blah Link to comment Share on other sites More sharing options...
gmz1023 Posted January 3, 2010 Author Share Posted January 3, 2010 Do you mean:http://example.com/index.php?scs=blah&atp=blah Yes thats what i mean. i can't get it to work correct though. i've got a quick work around i'm using right now. so i might be fine without it though lol Link to comment Share on other sites More sharing options...
jeffman Posted January 3, 2010 Share Posted January 3, 2010 Should this have some quotation marks?case vstr: Link to comment Share on other sites More sharing options...
Synook Posted January 3, 2010 Share Posted January 3, 2010 Also, the default case has to go at the end. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.