Re: [PHP] using variable in php form before the form is POSTed

[email protected] (Robert Cummings)
Newsgroups php.general
Organization InterJinn
Message-ID <1210648112.21547.0.camel@blobule>
On Mon, 2008-05-12 at 14:44 -0700, milt wrote:
> I have a form that will be filled in by the user, I want to have access to 
> the content of one of the fields in that form, in order to fill in an 
> another variable that is not part of the form.  this variable is used by a 
> routine when the form is "posted".  Question - is the $_post[field name] 
> availble before the submit button is pushed, or is there another way to get 
> the contents of the field?

PHP only gets what the browser sends. The browser doesn't send until you
click the submit button (or perform a synonymous action). You'll need to
use JavaScript to work on data before it is submitted.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.