Dear Professors!
I have this little code (part of my regsitration code) :
<?php
if (@$_POST['Submit'] == 'Register'){
if (strcmp(md5($_POST['user_code']),$_SESSION['ckey']))
{
die("Invalid code entered. Please enter the correct code as shown in the Image");
}
}
?>
<form name="form1" id="signupForm" method="post" action="register.php" style="padding:5px;">
<div class="reg_left">Security code:</div>
<div class="reg_right"><input name="user_code" type="text" size="10"> <img src="pngimg.php" align="middle" width="100" height="40"></div>
<div><input type="submit" name="Submit" class="submit" value="<?php echo $gomb_reg;?>"></div>
</form>
Unfortunatelly this is check if code is valid after post the form data. I would like to check before posting. So i think i must use Jquery validation plugin. (btw i use Jqery to validate the other fields like email, user, password). But as im not an expert in Jqery i need help to write that php code above in Jquery.
Thank you.