right i have a form, it uses ajax to check the if all fields have been filled in and if not say which ones haven’t without reloading the page. If all the fields have values it tghen redirects the user to a payment page.
This worked fine, but i want to save some data a session so i can retrieve the users information from the database on the payment page and send it off to moneybookers for payment.
Anyways, when i use this like of code:
$_SESSION['email'] = $result->email;
(The email address is held in an object) It seems to break my Ajax, it doesn’t seem to return any validation or redirect if the form is filled out.
Does anyone know why this is happening? Maybe PHP sessions conflict with Ajax somehow…. maybe….? I’m not an expert with Javascript so i really don’t know what to look for.
Thanks for the time.
var_dump($result->email);to make sure it contains whatever value you are expecting it to be.For debugging AJAX, you can use Chrome’s built in console’s