Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db = new PDO('mysql:host=localhost;dbname=database', 'username', '*****');
- $req = $db->prepare("INSERT INTO users
- (login, password, email, lastname)
- VALUES (:login, :password, :email, :lastname)");
- $req->execute(array(
- "login" => $_POST['login'],
- "password" => $_POST['password'],
- "email" => $_POST['email'],
- "lastname" => $_POST['lastname']
- ));
Add Comment
Please, Sign In to add comment