myalphb

register.php

Aug 28th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. require "init.php";
  4.  
  5. $username = $_POST["username"];
  6. $password = $_POST["password"];
  7. $firstname = $_POST["firstname"];
  8. $lastname = $_POST["lastname"];
  9. $birthday = $_POST["birthday"];
  10.  
  11.  
  12.  
  13. $sql .= "INSERT INTO user_info (username, password, firstname, lastname, birthday)
  14. VALUES ('".$username."', '".$password."', '".$firstname."','".$lastname."', '".$birthday."' )";
  15.  
  16. if(!mysqli_query($con, $sql)){
  17. echo '{"message":"Unable to save the data to the database."}';
  18. }
  19.  
  20. ?>
Add Comment
Please, Sign In to add comment