Drop down menu changing SQL values in table
Posted: Sat May 01, 2010 8:59 pm
Hi all,
I currently have a table on my webpage that is populated from a table in my SQL database. I'm looking to have a drop down menu above the table that has a list of values corresponding to the unique values in the first row of the table. When the user changes the value of this drop down box I want the table below to be updated to show the corresponding rows in the database.
i.e.
say i have a table like this in my database:
colour number
red 1
red 2
yellow 3
yellow 4
blue 5
blue 6
and I have a drop down box containing the three colours. When the user selects a colour from the drop down box I want the table below to be updated to show the two corresponding numbers.
Any help with this issue would be much appreciated.
Many thanks,
Nick
I currently have a table on my webpage that is populated from a table in my SQL database. I'm looking to have a drop down menu above the table that has a list of values corresponding to the unique values in the first row of the table. When the user changes the value of this drop down box I want the table below to be updated to show the corresponding rows in the database.
i.e.
say i have a table like this in my database:
colour number
red 1
red 2
yellow 3
yellow 4
blue 5
blue 6
and I have a drop down box containing the three colours. When the user selects a colour from the drop down box I want the table below to be updated to show the two corresponding numbers.
Any help with this issue would be much appreciated.
Many thanks,
Nick