Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.40 KB | None | 0 0
  1. <?php
  2. Define('ID_LEN',5);
  3.  
  4. // ODBC
  5. $DB = "KN_Online"
  6. $User = "Knight"
  7. $Pass = "Knight"
  8. $msconnect=odbc_connect("$DB","$User","$Pass");
  9.  
  10.  
  11.  
  12. // Login Info
  13. $login = sanitize(@$_POST['userid'],5);
  14.             $pw = sanitize($_POST['pass1'],5);
  15.             $c_pw =sanitize($_POST['pass2'],5);
  16.             $socNo = sanitize($_POST['charsil'],4);
  17.             $socNo2 = sanitize($_POST['charsil1'],4);
  18.             $email = sanitize($_POST['email'],25);
  19.             $email2 = sanitize($_POST['email1'],25);
  20.  
  21. // Buttons, Text.
  22. <form action="Register.php" method="post">
  23. ID: <input type="text" name="userid" />
  24. Password: <input type="text" name="pass1" />
  25. Confirm Passowrd: <input type="text" name="pass2" />
  26. Security Code: <input type="text" name="charsil" />
  27. Confirm Security Code: <input type="text" name="charsil1" />
  28. Email: <input type="text" name="email" />
  29. Confirm Email: <input type="text" name="email1" />
  30.  
  31. // Error Codes
  32. Error_Report (E_ALL ^ E_USER_NOTICE);
  33.  
  34. if ($pw != $c_pw) {
  35. echo 'Password Confirmed'
  36. end
  37.  
  38. if (!empty($login)
  39. echo 'Fill In Login Field'
  40. end
  41.  
  42. if (!empty($pw) && !empty($c_pw)
  43. echo 'Fill in Password Field'
  44. end
  45.  
  46. if (!empty($socNo) && !empty($socNo2)
  47. echo 'Fill In Security Code Field'
  48. end
  49.  
  50. if (!empty($email) && !empty($email2)
  51. echo 'Fill In Email Field'
  52. end
  53.  
  54. //Registration
  55. $msquery="INSERT INTO tb_user(strACcountID, strPasswd, strSocNo, Email) VALUES ('$login','$pw','$socNo','$email') ";
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. </form>
  65. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement