Advertisement
asimryu

join.php - 1

Jan 4th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. include("../dbcon.php");
  3. $uid = "";
  4. $upw = "";
  5. $uname = "";
  6. if( isset($_POST['uid']) ){
  7. $uid = $_POST['uid'];
  8. }
  9. if( isset($_POST['upw']) ){
  10. $upw = $_POST['upw'];
  11. }
  12. if( isset($_POST['uname']) ){
  13. $uname = $_POST['uname'];
  14. }
  15. if( $uid && $upw && $uname ){
  16. $upws = md5($upw);
  17. $sql = "insert into users set ";
  18. $sql .= " userid='{$uid}'";
  19. $sql .= ", userpw='{$upws}'";
  20. $sql .= ", username='{$uname}'";
  21. $db->query($sql);
  22. }
  23. header("Location: index.php");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement