Page 1 of 1

value from a form field - newbie question

Posted: Tue Mar 18, 2003 6:01 am
by manuel
hi forum,

i have to put the value of a formfield into the action of the form.
my "hardcoded" and working formaction looks like this:

action="mb_city.php?Search=Search&searchbranche=&searchort=Essen&searchname=&searchdetail="

at the point where you see "Essen", i have to insert the value of a form field. how can i manage this?

thanx!

greetz from essen/germany

manuel adler

Posted: Tue Mar 18, 2003 6:13 am
by pootergeist
why do it that way?

you could just set input boxes for name="search" name="searchort" etc and use method="get" which would effect the same URL

Posted: Tue Mar 18, 2003 6:14 am
by twigletmac
Is the formfield from another form or from the form that needs to be submitted?

Mac

value from a form field - newbie question

Posted: Tue Mar 18, 2003 6:20 am
by manuel
it's the same form...

Posted: Tue Mar 18, 2003 6:34 am
by twigletmac
Then as pootergeist pointed out you really don't need to add the value to the query string - you can either send the whole form using the GET method or just access the form variable on the processing page along with the other form variables in the $_POST array.

Mac

get values from a form field - newbee question

Posted: Tue Mar 18, 2003 7:41 am
by manuel
o.k.

i will try

thanx