swarndeep Posted September 6, 2012 Share Posted September 6, 2012 Hi I want to access javascript vaibale in PHP on the same page. How it can be possible?Anybody can help? Thanks. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 6, 2012 Share Posted September 6, 2012 querystring with $_GET[], post value with $_POST, JavaScript cookie read by php cookie, ajax which basically uses same principle as first option to read $_GET[] querystring passed to it by JavaScript. 1 Link to comment Share on other sites More sharing options...
niche Posted September 6, 2012 Share Posted September 6, 2012 Very cool dsonesuk. I didn't know that. http://stackoverflow.com/questions/1368097/how-to-read-javascript-cookie-with-php Link to comment Share on other sites More sharing options...
swarndeep Posted September 6, 2012 Author Share Posted September 6, 2012 Thank you dsonesuk . I set the variable in java script cookie and get that cookie from PHP. Thanks a lot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now