I am trying to submit and get values from a form. There, it checks if the input mail is filled. Problem is, I'm seeing it submitted everytime even if value is not filled.
Please see below codes.
<form name="testform" method="post" action="checkdata.php">
<input type="text" name="emailid"/> <br />
<input type="password" name="password"/><br />
<input type="submit" value="submit"/>
</form>
and on checkdata.php
if (isset($_POST["mailid"])) {
echo "Yes, mailid was submitted";
}else{
echo "No, mailid was not submitted";
}
What am I doing wrong here?