Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- KLIENT
- function checkUser(name, password) {
- http = XMLHttpRequest()
- http.SetRequestHeader("content-type", "application/x-www-form-urlencoded")
- var phpfile = "file.php"
- var params = "user=name&password=password"
- http.open("POST", file.php, 1)
- http.post(params)
- http.onReadyStateChange = func() {
- if (http.readyState == 4 && http.status = 200) {
- NECO UDELEJ
- }
- }
- }
- SERVER
- <?php
- if ($_POST) {
- ZISKEJ HESLO
- if ($_POST) == $heslo {
- TED CO ?
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement