I would like my page to respond to a query string in my URL. If there is nothing, I would like it to default to something. Make sense?
Anyhow, here is the code I am using:
And the error that I keep getting:
How do I correct this?
But it does set $var to whatever and that will show up on the page in the spots where I have echo $var. So, it's sort of working.
Anyhow, here is the code I am using:
Code:
<?php $id = $_GET['id'];
if (isset ($id))
{
$var = $id;
}
else
{
$var = "Something here";
}
?>
I understand that it's saying "Hey stupid, you have a variable but no value for it"Notice: Undefined index: id in /home/xxxxxxxxxx/public_html/index.php on line 3
How do I correct this?
But it does set $var to whatever and that will show up on the page in the spots where I have echo $var. So, it's sort of working.