Updating session variables
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!