Guest User

Untitled

a guest
Aug 28th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. HTML
  2.  
  3. <form action='signup.php' method='post' accept-charset="UTF-8">
  4. <label class="string" for="user_username">Username</label>
  5. <input id="user_username" style="margin-bottom: 15px;" type="text" name="username" size="30" />
  6. <label class="string" for="user_email">Email</label>
  7. <input id="user_email" style="margin-bottom: 15px;" type="text" name="mail" size="30" />
  8. <label class="string" for="user_password">Password</label>
  9. <input id="user_password" style="margin-bottom: 15px;" type="password" name="passwd" size="30" />
  10. <input class="btn btn-primary"
  11. style="clear: left;
  12. width: 100%;
  13. height: 32px;
  14. font-size: 13px;"
  15. type="submit" name="commit" value="Sign Up" />
  16. </form>
  17.  
  18. SIGNUP.PHP
  19.  
  20. <?php
  21. session_start();
  22. include_once("header.php");
  23. include_once("functions.php");
  24.  
  25. // THIS SECTION THAT FOLLOWS IS TO GRAB THE FIELD VALUES
  26.  
  27. $userid = $_POST('username');
  28. $passwd = $_POST('passwd');
  29. $email = $_POST('mail');
  30. $status = 'active';
  31.  
  32. echo "<p> Username = ".$userid."</p>";
  33. echo "<p> Password = ".$passwd."</p>";
  34. echo "<p> Email = ".$email."</p>";
  35. echo "<p> Status = ".$status."</p>";
  36.  
  37. add_user( $userid, $passwd, $email, $status );
  38. header("Location:index.php");
  39. ?>
Add Comment
Please, Sign In to add comment