I need to create a form that uses a validation to verify that the email is already registered in the bank or not.
Below the source code of the form, this code is in "Form Code":
Best Regards,
Below the source code of the form, this code is in "Form Code":
<html>
<DIV class=form_item >
<DIV class="form_element cf_text" >
<SPAN class=cf_text >Confirmation e-mail</SPAN>
</DIV>
<DIV class=clear > </DIV>
</DIV>
<DIV class=form_item >
<DIV class="form_element cf_textbox" >
<LABEL class=cf_label >confirmação de e-mail</LABEL>
<INPUT class="cf_inputbox required validate-email" id=email maxLength=150 size=30 name=email >
</DIV>
<DIV class=clear > </DIV></DIV>
<?
$email=email;
//Checks if the email is valid
$sql = "SELECT * FROM jos_forms WHERE email='"$email"'") or die(mysql_error());
$linha = mysql_fetch_array($sql);
$rows = mysql_num_rows($sql);
if($rows == 0){
echo "E-mail is not registered in the database."
}
?>
</html>
Best Regards,