<?php
if($_POST['submit']=="Sign Up") {
if(!$_POST['email']) $error.="<br />Please enter your email";
else if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) $error.="<br />Please enter a valid email adress";
if(!$_POST['password']) $error.="<br />Please enter your password";
else {
if(strlen($_POST['password'])<8) $error.="<br />Please enter a password with at least 8 characters";
if(!preg_match('`[A-Z]`', $_POST['password'])) $error.="<br />Please include at least one capital letter";
}
if($error) echo "There were error(s) in your signup details:".$error;
}
?>
<form method="post">
<input type="email" name="e-mail" id="email"/>
<input type="password" name="password"/>
<input type="submit" name="submit" value="Sign Up"/>
</form>
I am getting undefined index notice for the following line:
if($_POST['submit']=="Sign Up") {
What is the meaning of this kind of notices and how do I make it disappear?