Is there a way of having a user select an item from an HTML SELECT dropdown and then store it in a $_SESSION variable before they navigate away from a page? I know the obvious way is to get the FORM to return to the same page and then check for the variable being set, but I’m trying to modify something that someone else has done without a major rewrite!
I.e. can a session variable be set whose value changes depending on the user’s SELECT option without reloading the page?
All help much appreciated.
That is called AJAX.
http://nl.wikipedia.org/wiki/Asynchronous_JavaScript_and_XML
But there is no pure PHP way because PHP is serverside only.
So you will have to resort to javaScript.