Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2. include ('functions.php.inc');
  3.  
  4. if (strlen($_POST['email']) > 0 AND strlen($_POST['name'] > 0) AND strlen($_POST['password']) > 0)
  5. {
  6.     echo "ok, this worked";
  7.    
  8.     include ('db.php.inc');
  9.    
  10.     $email = $_POST['email'];
  11.     $user = $_POST['name'];
  12.     $password = salt($POST_['password']);
  13.    
  14.    
  15.     $sql = "INSERT into users SET email=\"$email\", name=\"$user\", password=\"$password\";";
  16.    
  17.     mysql_query($sql);
  18. }
  19.  
  20.  
  21. ?>
  22. <form name="input" action="" method="post">
  23. Email: <input type="text" name="email" /><br />
  24. Name: <input type="text" name="name" /><br />
  25. Password: <input type="password" name="password"><br />
  26. <input type="submit" value="Submit" />
  27. </form>
  28.  
  29. <?php
  30.  
  31. echo $email;
  32. echo "<br />";
  33. echo $user;
  34. echo "<br />";
  35. echo $password;
  36.  
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement