Advertisement
Guest User

Untitled

a guest
May 6th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <?php
  2.    
  3.     $user = $_POST['user'];
  4.     $pass1 = $_POST['pass1'];
  5.     $pass2 = $_POST['pass2'];
  6.     $position = "Member";
  7.     $date = date(dMY);
  8.     $email = $_POST['email'];
  9.  
  10.     // Make a MySQL Connection
  11.     mysql_connect("", "", "") or die(mysql_error());
  12.     mysql_select_db("foolish_forums") or die(mysql_error());
  13.  
  14.     if ($user != null) {
  15.         if ($pass != null) {
  16.             if ($pass2 != null) {
  17.                 if ($pass1 == $pass2) {
  18.                    
  19.                     $username = $user;
  20.                     $pass = $pass1;
  21.                    
  22.                     // Insert a row of information into the table "example"
  23.                     mysql_query("INSERT INTO uiqdb_users (
  24.                         username,
  25.                         password,
  26.                         position,
  27.                         joindate,
  28.                         email
  29.                     ) VALUES (
  30.                         '$username',
  31.                         '$password',
  32.                         '$position',
  33.                         '$date',
  34.                         '$email'
  35.                     )")
  36.                    
  37.                     or die(mysql_error());
  38.                    
  39.                     echo "Data Inserted!"
  40.                 }
  41.             }
  42.         }
  43.     }
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement