Hello all.
This might be a simple yes/no answer but:
Is it possible to use session variables from php code (code like $_SESSION['whatever']) inside javascript?. I am developing code to not only validate a form (the javascript part), but also set values into a session variable for use on another page (the php part).
Is this possible, and if so, does anyone have an example / link to it? If not, is there an alternate solution?
I don't have the code set up yet but I'm hoping it's going to validate something like the following:
- 4 radio buttons each with its own value, 1-4
- javascript is used to check which button is pressed
- depending on the button, the session variable is set to the radio button's value
- the session variable is then used on another page ...