Using $_GET
Posted: Wed Sep 08, 2010 12:31 pm
Hello,
I am trying to use the $_GET command to build my webpages, however on the tutorial page I would like to put another $_GET command inside the first..
For example: index.php?section=tutorial&viewing=18-classes_or_ids
How do I create the tutorial&viewing variable inside of the section variable?
Here is my code at the moment:
Thanks
I am trying to use the $_GET command to build my webpages, however on the tutorial page I would like to put another $_GET command inside the first..
For example: index.php?section=tutorial&viewing=18-classes_or_ids
How do I create the tutorial&viewing variable inside of the section variable?
Here is my code at the moment:
Code: Select all
<?php
$section = $_GET['section'];
switch ($section)
{
case "home":
include("home.html");
break;
case "register":
include("register.html");
break;
case "tutorials_home":
include("tutorial.html");
break;
default:
include("home.html");
break;
$tutorials = $_GET['tutorial&viewing'];
switch ($tutorials)
{
case "18-classes_or_ids":
include("cassesorids.html");
}
}
?>