is there a way to pass 2 variables from one form element. What am trying to do is this, in the pull down menu i have 2 distinct values i would like to pass. is there a way of passing the second variable some how ?
in the pull-down menu i have category and the subcategory
when you want to select something from the menu it looks somethig like this
is there any way so both of them are getting passed ?
08-08-2002, 08:34 PM
It would be easier if you just used two select boxes with one being the categories and the second being the subcategories. Like this:
Then when submitted both values would be available to your php script.
08-08-2002, 08:47 PM
The problem am having is that in not sure how to put PHP and Java Script together.
Do you know of a sample form just the one you showed me but done dynamicaly ?
thanx in advance
08-08-2002, 08:50 PM
You can pull the data from a db with that same concept. Use the first combo to select a category. Use an onchange event to trigger a form submit and query the database based on the selection and then regenerate the second combo box with the values that were pulled.
08-08-2002, 09:09 PM
i got the concept on how to do it ... but being a novice .. am not sure where to begin and how to put things together, but thanx for the tip.