daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Jul 21st, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function registerUser() {
  2.     httpObject = getHTTPObject();
  3.     if (httpObject != null) {
  4.     httpObject.open("GET", "backend/register.php?action=registerUser&username=" + document.getElementById('txtUsername').value + "&password=" + document.getElementById('txtPassword').value + "&emailAddress=" + document.getElementById('txtEmail').value, true);
  5.     httpObject.send(null);
  6.     httpObject.onreadystatechange = handleRegistration;
  7.     }
  8. }
  9.  
  10. function handleRegistration() {
  11.     if(httpObject.readyState == 4) {
  12.     if (httpObject.responseText == '1') {
  13.         window.location = "/register2.php";
  14.     } else if (httpObject.responseText == '0') {
  15.         document.getElementById('tdUsername').innerHTML = 'Registration failed.';
  16.     } else {
  17.         document.getElementById('tdUsername').innerHTML = 'Server error.';
  18.     }
  19.     }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top