Jump to content

Switch Question


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.

Edited by gmz1023
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...