php javascript mysql select row from mysql database
bananalive
8:19 pm on Aug 4, 2008 (gmt 0)
I have php displaying a dropdown box with list of rows in mysql database. On dropdown select of an option I want a javascript variable to be define with the value in the mysql row selected. Is this possible in one query?
Thanks
eelixduppy
5:40 am on Aug 5, 2008 (gmt 0)
If you store the results from the first query into a multi-dimentional Javascript array, then you'd have access to that anywhere. You use that array to dynamically create a dropdown menu, and then you use the selected index to grab the data from the array.