undifined variables
chapter 13 - file register.php
the file either displays a form or registers the users submitted details. the Switch below determines whether the form has been submitted or not:
switch($action) {
case "register":
create_account();
break;
default:
html_header();
register_form();
html_footer();
break;
}
i am recieving the following error when i load the file:
Notice: Undefined variable: action in ...
which makes sense to me as the hidden field in the form "action" has not yet been submited.
so why does this code expect the variable "action" to be defined before it is???
|