1/* PDO Class to connect to the database*/
2/* Make sure you add the connect file which has the variable $connect */
3$name = $_POST["name"];
4$password = $_POST["password"];
5$stmt = $connect->prepare("INSERT INTO tablename(name, password) VALUES(:name, :pass)");
6$stmt->execute(array(
7 "name" => $name,
8 "pass" => $password
9));
10/*
11 Check how to connect to the db using PDO
12 Type in google search: php how to connect to db using PDO
13 you will find the answer for this question posted by me
14*/