Pass dropdown value to database.. how?

I have been trying now for two days but still not getting my form to
insert a complete record in the database.

I have a City dropdown which is dynamicly populated from the City Table.
Now I need to pass the selected value from the dropdown (CityID) with the entry textfields
to the environment table. CityID value being the foreign key value.
At the moment I get the entry text values being saved to the database, or when changing things around only the CityID saved to the database.
Somehow I am missing the step to hook them all together to post them in 1 row in the Environment table


You are mixing GET and POST in the same action… you need to pick one. Usually for a form, you will use POST. Assuming your form is already set to post, just change the GET parameter to a POST.

Aha yes, that simple huh? :smiley:
Got it working by changing the following:

  • create a variable variable under the $_POST
  • In the insert options change the Get to Post
  • Match the Name of the dropdown to the variable name

Thanks, mebeingken!