On Fri, 21 Jun 2002, Ma Siva Kumar wrote:

> In one of the forms, there is a selection for City in the address details
> as well as one for the port of destination. If I use the function both the
> the select name will be form[city_id]. The port of destination selection
> overwrites the form[city_id] from the selection of City.

Use different variable names.  Or make your function return a value, and use 
assignment to handle it.

> In short is it possible to access a variable from the form before the form
> is posted?

In short, no.

The flow is like this:

Browser requests page.
Webserver serves page, after parsing (if needed).
Browser displays page to user, and essentially disconnects from webserver.
User fills in form.  Server has no clue as of yet.
User presses submit.  Browser connects to server and sends data.  Server now 
knows about the data.


Sapere aude
My mind not only wanders, it sometimes leaves completely.
Never attribute to malice that which can be adequately explained by stupidity.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to