Trying to figure out how to use _GET().
I can pass and grab a single variable, but when I uncomment the code for the second variable I run into problems. Script will run until a link is clicked.
How do you grab the second variable being passed?
Thanks,
Ken
Code: Select all
echo "<html><title>Get Test</title><head></head><body>";
if(!isset($_GET['cat']))
{$cat="0";}
else
{$cat=$_GET['cat'];}
/*if(!isset($_GET['cid']))
{$cid="0";}
else
{$cid=$_GET('cid');}
*/
echo "</p>CAT: ".$cat;
echo "<br />CID: ".$cid;
$title = "Test";
for ($i = 0; $i <= 10; $i++)
{
$cat= $cid*2;
$cid++;
echo "<br /><a href="$self?cat=$cat&cid=$cid">$title</a>\r\n";
}
echo "</body></html>";