Chicken Posted July 19, 2007 Share Posted July 19, 2007 <?php $_GET["s"]; if ($s = 1) { echo "Test1"; } elseif ($s = 2) { echo "Test2"; } echo "Home"; ?> Any help is greatly appreciated, as I'm quite new at this Quote Link to comment Share on other sites More sharing options...
jitesh Posted July 19, 2007 Share Posted July 19, 2007 <?php $s = $_GET["s"]; // or extract($_GET); or register global should be On if ($s == 1) { echo "Test1"; } elseif ($s == 2) { echo "Test2"; } echo "Home"; ?> Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 19, 2007 Share Posted July 19, 2007 use switch its better switch($_GET["s"]){ case 's': //do somthing break; case 'd': //do somthing break; default: //default avlue break; } Quote Link to comment Share on other sites More sharing options...
Chicken Posted July 19, 2007 Author Share Posted July 19, 2007 much thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.