chanchelkumar Posted February 20, 2008 Share Posted February 20, 2008 Hi all, I want to store a javascript value to a php variable?? please give me the syntax? Say: javascript value= imgList1['<?=$k?>']; i want to store this one to $image; please help me... Quote Link to comment Share on other sites More sharing options...
Dragen Posted February 20, 2008 Share Posted February 20, 2008 javascript can't directly interact with php, as it is client-side, whereas php is server-side. One way though is to set a cookie (or session cookie) with javascript that the php file can then read. Although if you're trying to use javascript to change an image then you could look into ajax. With ajax you can use javascript to access a file with variables attached (through get, or post). Quote Link to comment Share on other sites More sharing options...
chanchelkumar Posted February 20, 2008 Author Share Posted February 20, 2008 thanks, Fixed with some udayippu Queries!!!! thanks for your help.. Quote Link to comment Share on other sites More sharing options...
Dragen Posted February 20, 2008 Share Posted February 20, 2008 Fixed with some udayippu Queries!!!! what? 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.