How to insert in Mysql with Jquery Ajax with validation?
Using of this tutorials you can easily Insert data in database and validate your form using jquery. Create ajax.php file <?php mysql_connect("localhost", "root", "")or die("cannot connect"); mysql_select_db("prodchecklist")or die("cannot select DB"); // CLIENT INFORMATION $fname = htmlspecialchars(trim($_POST['fname'])); $lname = htmlspecialchars(trim($_POST['lname'])); $addClient = "INSERT INTO tbluser (username,userpassword) VALUES ('$fname','$lname')"; mysql_query($addClient) or die(mysql_error()); ?>