Advertisement
Guest User

Untitled

a guest
Aug 15th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2. // register.php
  3. include("./Header.php"); // make Header.php include your mysql database connect
  4. if(!$_POST['submit']){
  5. echo "<form method=\"post\">";
  6. echo "Username <input type=\"text\" name=\"username\"> <br>";
  7. echo "Password <input type=\"password\" name=\"password\"><br>";
  8. echo "<input type=\"submit\" name=\"submit\">";
  9. }else{
  10. $username = $_POST['username'];
  11. $password = $_POST['password'];
  12. if(!$username){
  13. die("You need to specify a username.");
  14. }
  15. if(!$password){
  16. die("You need to specify a password.");
  17. }
  18. // mysql insert here
  19.  
  20. }
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement