I am writing a thing to compare two passwords with each other, if they match the script sends out a response that says it is the same.
I currently have got this code:
$("#repeatPw").keyup(function(){
jQuery.ajax({
url: "System/Javascript/Functions/checkPasswords.php",
data: "'password1'='" + $("#Password").val() + "', 'password2'='" + $("#repeatPw").val() + "'",
type: "POST",
success: function(data) {
$("#passwordMatch").html(data);
},
error: function(data) {}
});
});
Now my problem is that i cant get this password1 and password2 in a proper array i can explode in the checkPasswords.php, this posts this:
Array ( ['password1'] => 'fasfasdfasSD2', 'password2'='asdasdasd' )
But this is not a proper array as it only puts password1 in proper array format, how would i go about making password2 in this format too?
Thank you all in advance!