Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <form action="script.php" method="post">
  2. <input type="text" name="username" value="$username" />
  3. <input type="text" name="password" value="$password" />
  4. <input type="submit" name="submit" />
  5. </form>
  6.  
  7. <?php
  8.  
  9. require_once("mysql.php");
  10.  
  11. if (!empty($_POST['username']) && !empty($_POST['password']) {
  12.  
  13. $username = $_POST['username'];
  14. $password = $_POST['password'];
  15.  
  16. mysql_query("INSERT into USERS (username,password) VALUES ('$username', '$password')");
  17.  
  18. }
  19.  
  20. else "Go back and fill out the form.";
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement