Query from selection in comboboxes

Asked

Viewed 54 times

0

I have four comboboxes populated with data from a database, using js. The user selects options in these 4 boxes and, from there, I want to do a query with the options chosen. How can I take these options and save them in variables to use in my query?

  • When you say "combobox" you mean a select with several options, right? Give a name at the select and a value for each option causes the value that select is the value of the selected item. Then you can submit as part of a form or - if you are using ajax - get it in the same way as you would get the value of any element (eg.: var valor = document.getElementById("meuSelect").value).

  • For example, the first combobox is a list of cities. Options are filled by a while with mysql_fetch_assoc.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.