Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.99 KB | None | 0 0
  1. if (ISSET($_POST['username'])){
  2.     $username = $_POST['username'];
  3.     $password = $_POST['password'];
  4.     $repass = $_POST['repass'];
  5.     $email = $_POST['email'];
  6.     $sex = $_POST['sex'];
  7.     $lookingfor = $_POST['lookingfor'];
  8.     $lookfor = $_POST['lookfor'];
  9.     $day = $_POST['day'];
  10.     $month = $_POST['month'];
  11.     $year = $_POST['year'];
  12.     $country = $_POST['country'];
  13.     $zipcode = $_POST['zipcode'];
  14.     $mobile = $_POST['mobile'];
  15.     $birth = $day + $month + $year;
  16.     $birthdate = $birth * 1000;
  17.     $newuser = "INSERT INTO users (username, userpass, email, sex, lookingfor, forwhat, birthdate, country, zipcode, mobilephone)
  18.                    VALUES ('$username', '$userpass', '$email', $sex, '$lookingfor', '$lookfor', $birthdate, '$country', $zipcode, $mobile)";
  19.     $result = mysql_query($newuser, $conn);
  20.         if($result){
  21.             header('Location: index.php');
  22.             echo "Success!";
  23.         }else{
  24.             echo "We got a problem!";
  25.         }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement