Updating session variables

posted by | Leave a comment

As soon as I refresh the page or go to another page, that session variable is back to the original quantity.The session information is saved in a My SQL database.I'm not sure if the problem can be solved by PHP or Javascript.I have an ajax call on my page that is supposed to update a PHP session.

updating session variables-71updating session variables-48updating session variables-46

To learn how to configure and use these component classes, please refer to their API documentation.

A Session is a unique identifier that is recorded on the server and in your browser.

By recording this information, the server is able to maintain the state across many page requests.

I do not know why the ajax script would return the correct quantity, but then subsequent pages show the wrong quantity. (Note I actually had called session_id and session_start in the above code.

Any suggestions on whether PHP or Java Script would fix this problem? I actually called session_id twice accidentally, but even with the calls in the order below and no second call, it did not work) // AJAX passes variables: q_code, q_qty, sess_id // make sure using same session id session_id($_GET['sess_id']); session_start(); // the correct number is displayed!

Leave a Reply

dating in louth lincolnshire