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... Link to comment https://forums.phpfreaks.com/topic/92105-solved-concantinate-phpvariable-and-javascript-vaiable/ 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). Link to comment https://forums.phpfreaks.com/topic/92105-solved-concantinate-phpvariable-and-javascript-vaiable/#findComment-471657 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.. Link to comment https://forums.phpfreaks.com/topic/92105-solved-concantinate-phpvariable-and-javascript-vaiable/#findComment-471963 Share on other sites More sharing options...
Dragen Posted February 20, 2008 Share Posted February 20, 2008 Fixed with some udayippu Queries!!!! what? Link to comment https://forums.phpfreaks.com/topic/92105-solved-concantinate-phpvariable-and-javascript-vaiable/#findComment-472030 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.