Discussion:
pass parameter from client to server
iccsi
2013-07-18 22:04:40 UTC
Permalink
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,

Regards,

Iccsi,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Brown
2013-07-18 22:07:35 UTC
Permalink
Post by iccsi
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 P. Brown>
Network Infrastructure Manager
http://www.php.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tedd Sperling
2013-07-19 01:06:10 UTC
Permalink
Post by Daniel Brown
Post by iccsi
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


_____________________
***@gmail.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tedd Sperling
2013-07-19 01:08:38 UTC
Permalink
One additional comment.

Please change the javascript onclick to onchange -- that way the demo will work for Chrome as well as other Browsers.

Cheers,

tedd

_____________________
***@sperling.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Joshua Kehn
2013-07-19 01:53:35 UTC
Permalink
Could also use jquery instead

Best,

-Josh
___________________________
http://byjakt.com
Currently mobile
Post by Tedd Sperling
One additional comment.
Please change the javascript onclick to onchange -- that way the demo will work for Chrome as well as other Browsers.
Cheers,
tedd
_____________________
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tamara Temple
2013-07-19 06:51:47 UTC
Permalink
Post by Joshua Kehn
Could also use jquery instead
True, but it's good to see the bare javascript as well in a demo.
Post by Joshua Kehn
Best,
-Josh
___________________________
http://byjakt.com
Currently mobile
Post by Tedd Sperling
One additional comment.
Please change the javascript onclick to onchange -- that way the demo will work for Chrome as well as other Browsers.
Cheers,
tedd
_____________________
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...