Posted on 2011-09-13
I have read various postings on this subject and am uncertain whether this can/cannot be done.
My code is PHP.
I have a Countdown clock which is JS powered.
However if the user alters a time setting I want the countdown to alter accordingly.
So if my sessions variable for year is given by $_SESSION['Year'].
I have tried to transfer this in the JS along the lines of...
var year = '<%=Session["Year"].ToString() %>'; or
var year = '<%=Session["$_SESSION['Year']"].ToString() %>';
Have I got my syntax incorrect or is this impossible?
I would prefer not to have to pass this via the URL.