SHARE
TWEET

Untitled

a guest Dec 23rd, 2017 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.     include 'config.php';
  4.  
  5.     $username = $_POST['username'];
  6.     $username = mysql_real_escape_string($username);
  7.    
  8.     $firstname = $_POST['firstname'];
  9.     $lastname = $_POST['lastname'];
  10.    
  11.     $password = $_POST['password'];
  12.     $password = mysql_real_escape_string($password);
  13.        
  14.     $security = md5("$password");
  15.    
  16.     if ($_POST['submit']&&$username&&$password&&$firstname&&$lastname)
  17.     {
  18.         $query = "INSERT INTO userinfo (userid, username, firstname, lastname, password) VALUES ('','$username', '$firstname', '$lastname', '$security')";
  19.         $result = mysql_query($query);
  20.         mkdir("users/$username/", 0700);
  21.        
  22.         echo "Welcome to the community, $username!";
  23.     }
  24.     else { echo "Something went wrong! Make sure you entered your name and password(and confirm).. Thats all we know."; }
  25.  
  26. ?>
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
 
Top