SHARE
TWEET

Untitled

a guest Jun 17th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php ob_start();
  2. // CONNECT TO THE DATABASE
  3.     require('../../includes/_config/connection.php');
  4. // LOAD FUNCTIONS
  5.     require('../../includes/functions.php');
  6. $username = $_POST['username'];
  7. $password = $_POST['password'];
  8. $firstname = $_POST['firstname'];
  9. $lastname = $_POST['lastname'];
  10. $email = $_POST['email'];
  11. $number = $_POST['number'];
  12. $dob = $_POST['dob'];
  13. $accounttype = $_POST['accounttype'];
  14.  
  15.  
  16. $query="INSERT INTO ptb_registrations (
  17. username,
  18. password,
  19. firstname,
  20. lastname,
  21. email,
  22. number,
  23. dob,
  24. accounttype,
  25. date_created )
  26. VALUES(
  27. '".$username."',
  28. '".$password."',
  29. '".$firstname."',
  30. '".$lastname."',
  31. '".$email."',
  32. '".$number."',
  33. '".$dob."',
  34. '".$accounttype."',
  35. now()
  36. )";
  37. mysql_query($query) or die();
  38.  
  39.  
  40. $query="INSERT INTO ptb_users (
  41. first_name,
  42. last_name,
  43. email,
  44. password )
  45. VALUES(
  46. '".$firstname."',
  47. '".$lastname."',
  48. '".$email."',
  49. MD5('".$password."')
  50. )";
  51. mysql_query($query) or dieerr();
  52. $result = mysql_query("UPDATE ptb_users SET ptb_users.user_id = ptb_users.id,
  53.       ptb_users.account_type = 'Client'");
  54.      
  55. $result = mysql_query("
  56.     UPDATE ptb_users
  57.     SET ptb_users.user_id = ptb_users.id,
  58.         ptb_users.account_type = 'Client'
  59.     WHERE id = LAST_INSERT_ID()
  60. ");
  61.      
  62. mysql_query("UPDATE ptb_users SET ptb_users.user_id = ptb_users.id,
  63.      ptb_users.account_type = 'Client'" WHERE ptb_user.email='$email');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top