jeet_0077 Posted February 8, 2008 Share Posted February 8, 2008 Hi Can some one help me on how to assign a javascript value to php variable. Say I have a script like this: <script> var jsVariable = 'some value'; </script> I need that value to be assigned in a php variable $phpVariable I know that I can redirect the page with the variable as : http://domain.com/pagename.php?var=jsVariable with javascript and in the page I can get this value there. But I need in the same page and I cant refresh the page as well. Please help. Thanks in Advance. Quote Link to comment https://forums.phpfreaks.com/topic/90104-javascript-variable-to-php-variable/ Share on other sites More sharing options...
amites Posted February 8, 2008 Share Posted February 8, 2008 time to start learning AJAX, not what this forum is for but that's how to do what you're looking for Quote Link to comment https://forums.phpfreaks.com/topic/90104-javascript-variable-to-php-variable/#findComment-462119 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.