Re: pass parameter from client to server
| From: | Tedd Sperling | Date: | Fri, 19 Jul 2013 01:06:10 +0000 |
| Subject: | Re: pass parameter from client to server | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-321643@lists.php.net to get a copy of this message | ||
On Jul 18, 2013, at 6:07 PM, Daniel Brown <danbrown@php.net> wrote:
> On Thu, Jul 18, 2013 at 6:04 PM, iccsi <inungh@gmail.com> wrote:
>> I have a select control on the form and need to pass value user select to my
>> query parameter.
>> I just realized that user entry value is client side and query parameter is
>> server side.
>> Are there any way to read client parameter to pass to server?
>>
>> You information and help is great appreciated,
>
> Not from PHP unless you pass it via GET or POST, or as a cookie.
> You may want to look into JavaScript, jQuery, and AJAX for your
> specific needs, but that all gets beyond the scope of this list.
Daniel is right.
Here's my way to do what you are asking:
http://php1.net/a/ajax/
Please examine the javascript that accompanies the demo.
It simply sends GET values to a php script that changes the values in the GET Array without a
refresh.
However, I would not provide such access to a db query without a great deal of cleaning.
Cheers,
tedd
_____________________
tedd.sperling@gmail.com
http://sperling.com