I have a script to check validation through mysql db, i use jquery to post and call back a result, if validate success will redirect to another url, else will pop up a reminder alert.
function chkValid(){
$.post('check_validate.php', $("#form").serialize(), function(data) {
// if invalid, pop up alert
alert(data);
// if valid, redirect
window.location("url");
});
could it be done by the scripts above?
Thanks.
}
you must get what the “check_validate.php” returns to you that was processed in the server side.
your “check_validate.php” must echo a message… for example
and let the Jquery process the echo string of your check_validate.php