Jump to content

sessions and ajax.


ToonMariner

Recommended Posts

OK this driving me crazy.

I have a shopping cart that I am adding ajax functionality to. The cart functions brillinatly without javascript but I want to improve the clients experience.

Anyway I have built a cart class and a page that constructs the html for the div that shows its contents - these are the same scripts called if js in on or not (ajax just removes all teh rest of the processing for the whole page.) Now the ajax request reports that a session variable 'cart' has been constructed and serialized. Unfortunately any subsequent request sees the sessions revert to one created before the ajax request (if it was present) or simply disappears.

Could anyone please let me know what they think is going on; and if you need to see some code let me know - there is a fair bit so I don't want to drown your eyes just yet.
Link to comment
https://forums.phpfreaks.com/topic/28222-sessions-and-ajax/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.