I am making a registration page using js but having some difficulties checking if user exist in the database plz help me out with this
HTML Code:
<script type="text/javascript"> $(document).ready(function(){ $("#regform").validate({ debug: false, rules: { username: "required", remote: { url: "check_user.php", type: "post", }, password: "required", email: { required: true, email: true } }, messages: { username: { required: "Please create a desired username!", remote: "u already exist", }, email: "Enter a valid email address!<br/>", password: "Please create a personal password!", }, submitHandler: function(form) { // do other stuff for a valid form $.post('reg_submit.php', $("#regform").serialize(), function(data) { $('#insert').html(data); }); } }); }); </script>
Comment