when you load the page for the first time, you certain have not made a submit, hence the value does not exists and that is the error you get. you need to test, whether the key exists before you can use it.
Expand|Select|Wrap|Line Numbers
if (isset($_GET['submit']))
{
// there was a submit element
}
note that the submit button is not submitted by every browser (e.g. IE)
when you load the page for the first time, you certain have not made a submit, hence the value does not exists and that is the error you get. you need to test, whether the key exists before you can use it.
Expand|Select|Wrap|Line Numbers
if (isset($_GET['submit']))
{
// there was a submit element
}
note that the submit button is not submitted by every browser (e.g. IE)