Tuesday, April 30, 2019

Undefined index in PHP

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












SSN
 


}
else {
//code here
}
?>

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...