Re: Jvascript into PHP

by David Mintz <mambomintz(at)yahoo.com>

 Date:  Mon, 21 May 2001 10:57:37 -0700 (PDT)
 To:  hwg-languages(at)hwg.org
 In-Reply-To:  net
  todo: View Thread, Original
I'm not totally sure I understand the question but
assuming I do...

PHP doesn't seem to care whether a variable comes from
a query string or a POSTed form variable or a cookie.
Your javascript can, for example, modify the value in
a form field on the onSubmit event, and PHP will see
it as modified (if the client supports javascript).
I've had good luck using this technique when, for
example, the underlying VALUE of a SELECT menu's
OPTIONs is an integer corresponding to a database
record id, and the human-readable label is a string:
on onSubmit you can tell javascript to put the
human-readable part of the SELECTed OPTION in a hidden
field, and pass it to your PHP script. (Or to one
written in any server side scripting language, for
that matter.)

David Mintz
Spanish Interpreter
US District Court, SDNY
Personal http://panix.com/~dmintz/
Web design & hosting http://dmintzweb.com/


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA