Question

Locked

PHP Error, Notice: Undefined index: q

By pbaloyi ·
Am new to php and am using wamp as my server. I have the following code;

<?php
If ($_GET['q'] == 'home')
{
$pagename="home";
$title="Welcome";
$header="Welcome to the Homepage";
$content="Welcome to the Homepage of a lifetime";
}
?>

and html code as follows,
<a href="index.php?q=home">Home</a> |

When i open the webpage for the first time, an error appears:
Notice: Undefined index: q in C:\wamp\www\prizeinfo\index.php on line 3

but if i click the link 'home' the error disappears. Please i need help on this.

Thanks

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Back to Networks Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums