Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function check_input($value) {
- $value = trim($value);
- $value = stripslashes($value);
- $value = htmlspecialchars($value);
- return $value;
- }
- if(isset($_POST["submit"])){
- $user_login = check_input($_POST["login"]);
- $user_password = check_input($_POST["password"]);
- $user_firstname = check_input($_POST["firstname"]);
- $user_lastname = check_input($_POST["lastname"]);
- $user_vathername = check_input($_POST["vathername"]);
- $user_sex = check_input($_POST["sex"]);
- $user_dateBirth = check_input($_POST["dateBirth"]);
- $user_address = check_input($_POST["address"]);
- $user_phone = check_input($_POST["phone"]);
- $user_email = check_input($_POST["email"]);
- }
- try{
- require_once ("datebase.php");
- $set_local = $conn->prepare('SET lc_time_names="ru_RU"');
- $set_local->execute();
- $select_user = $conn->prepare('INSERT INTO client( password, First_name, Last_name, Vater_name, Sex, Date_birth, Address, Phone, Email) VALUES (:password, :firstname, :laststname, :Vater_name, :Sex, :Date_birth, :Address, :Phone, :Email )');
- $select_user ->bindParam(':password', $user_password);
- $select_user ->bindParam(':firstname', $user_firstname);
- $select_user ->bindParam(':laststname', $user_lastname);
- $select_user ->bindParam(':Vater_name', $user_vathername);
- $select_user ->bindParam(':Sex', $user_sex);
- $select_user ->bindParam(':Date_birth', $user_dateBirth);
- $select_user ->bindParam(':Address', $user_address);
- $select_user ->bindParam(':Phone', $user_phone);
- $select_user ->bindParam(':Email', $user_email);
- $select_user ->execute();
- }
- catch(PDOException $e) {
- echo 'ERROR: ' . $e->getMessage();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement