Re: Using JavaScript variables in PHP

From: Date: Thu, 20 Nov 2003 16:33:49 +0000
Subject: Re: Using JavaScript variables in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170430@lists.php.net to get a copy of this message
>How does one go about using a JavaScript variable with PHP code. I have >a function in JavaScript that takes a single input parameter (ID). I >want to use this ID variable as the value on the where clause of a >database query. > >Example: "select * from somedatabase where field=ID" > >Can this be done, and if so how? I have been unable to figure this out. Not unless you include the javascript variable in a subsequent GET or POST request to the server - once your browser renders an HTTP response, PHP's involvement is long finished. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html

« previous php.general (#170430) next »