Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createUser() {
- var username = document.getElementById("inputUsername").value;
- var password = document.getElementById("inputPassword").value;
- var rank = document.getElementById("inputRank").value;
- if(username === "" || password === "" || rank === ""){
- showErrorMessage();
- }else{
- $.ajax({
- type: "POST",
- url: "./createAccount.php",
- dataType: 'html',
- data: {username: username, password: password, rank: rank},
- success: function(data, textStatus, xhr) {
- if(xhr.status === 200){
- showSuccessMessage();
- }else{
- showInternError();
- }
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement