garryd Posted August 31, 2007 Share Posted August 31, 2007 I need help learning how to pass a variable from javascript to php. I remember reading somewhere that it could be done using a hidden field and $_GET to retrieve the data. Any advice would be welcomed. Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 31, 2007 Share Posted August 31, 2007 Are you planning on submitting a form anyway? If so, make a hidden field and use javascript to set the value of it. Then you can get it when you POST the form. If you're not submitting a form You'll need to use AJAX. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.