It's where you test to see that is isn't there. It should be !isset($_POST['SUBMIT'])
. This is because the index, SUBMIT
, won't be set, thus won't have a value such as true to pass the if(...)
. isset()
checks to see if the index/variable is actually set.
Try this:
if (!isset($_POST['SUBMIT'])){ //ERROR: Undefined index
?>
Add Employee
}
else {
//code here
}
?>
No comments:
Post a Comment