Re: Passing Javascript Variables to PHP

From: Date: Tue, 02 Apr 2002 20:24:59 +0000
Subject: Re: Passing Javascript Variables to PHP
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-12905@lists.php.net to get a copy of this message
One possible way to do this is, when submitting a form, set a hidden variable to the value using javascript. Example: <script> function setVars( theForm ) { theForm.jsvar.value = 'somevalue'; theForm.submit(); } </script> ... <form> <input type="hidden" name="jsvar"> <input type="button" name="btnSubmit" value="Submit" onClick="javascript: setVars(this.form);"> </form> This is just a suggestion. -- Nicole Amashta Web Application Development "Wayne Hinch" <hinchy2000@lineone.net> wrote in message news:000001c1da71$79967e30$0300a8c0@gromit... > Hi all, > > Does anyone know if it is possible to pass variables from JavaScript to > PHP? > > Any help will be much appreciated > > Many Thanks >

« previous php.windows (#12905) next »