Advertisement
Guest User

Untitled

a guest
May 10th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. KLIENT
  2.  
  3. function checkUser(name, password) {
  4.  
  5. http = XMLHttpRequest()
  6. http.SetRequestHeader("content-type", "application/x-www-form-urlencoded")
  7.  
  8. var phpfile = "file.php"
  9. var params = "user=name&password=password"
  10.  
  11. http.open("POST", file.php, 1)
  12. http.post(params)
  13.  
  14. http.onReadyStateChange = func() {
  15. if (http.readyState == 4 && http.status = 200) {
  16. NECO UDELEJ
  17. }
  18. }
  19. }
  20.  
  21. SERVER
  22. <?php
  23. if ($_POST) {
  24. ZISKEJ HESLO
  25. if ($_POST) == $heslo {
  26. TED CO ?
  27. }
  28. }
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement