I am new to the ajax concept, but i am having touble setting it up correctly. I am able to to login in the conventional way (using $_POST to another PHP script and then processing), but now I am trying to do it the Ajax way, but I am pretty new to it.
I asked ealier in another question how to accomplish this and they put me in the right direction, but I am still confused as to how I pass the parameters of the form so that my receiver page gets them.
How should I pass the inputs under the inputs :// line in jquery? see below
<?php
echo '$("#submitlogin").click(function() {
inputs = //grab then inputs of your form #loginform
//Not sure how to pass the values here? is it with commas and apostrophes?
$.ajax ({
url: "loggnow.php",
data: inputs,
success: function() {
$("#login").html("You are now logged in!");
}
});
}';