Advertisement
Guest User

Untitled

a guest
Aug 4th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  5. <script>
  6. function fnajax()
  7. {
  8. var xhttp = new XMLHttpRequest();
  9. xhttp.onreadystatechange = function()
  10. {
  11. if (xhttp.readyState == 4 && xhttp.status == 200)
  12. {
  13. document.getElementById("demo").innerHTML = xhttp.responseText;
  14. }
  15. };
  16. var username=document.getElementById("username").value;
  17. var password=document.getElementById("password").value;
  18. xhttp.open("GET", "ajaxworker.php?username="+username+'&password='+password, true);
  19. xhttp.send();
  20. }
  21. </script>
  22. </script>
  23. </head>
  24. <body>
  25.  
  26. <form id="frm1" action="process.php" method="post">
  27. <input type="text" id="username" name="username" placeholder="User Name" />
  28. <input type="password" id="password" name="password" placeholder="Password" />
  29. <input type="button" onclick="fnajax()" value="submit"/>
  30. <!--<input type="submit" /> -->
  31. <div id="demo"></div>
  32. </form>
  33. </body>
  34. </html>
  35.  
  36. <?php
  37. echo "hey " .$_GET['username']."!, your password was ".$_GET['password'];
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement