RE: [PHP] how i assign a js variable to a php variable

From: Date: Fri, 18 Sep 2009 11:01:28 +0000
Subject: RE: [PHP] how i assign a js variable to a php variable
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-298137@lists.php.net to get a copy of this message
> basicly is use hidden inputs as a container for php variables, and transform > through js. really? I though the other way round was extremely simple: echo '<script type="text/javascript">var myPHPvar=eval("('.addslashes(json_encode($myPHPvar)).')");</script>'; why would you use hidden input, plus DOM to get data, etc, etc? _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx

« previous php.general (#298137) next »