OK, I have been searching, reading tutorials, and learning for 3 days now… I have found examples of code that do things kinda similar to what I want to do, but nothing that shows me exactly what I’m missing. It seems to me that what I’m trying to do is not rocket science, and should be as simple as placing some variables in the <option> lines, but I guess I’m so much of a noob that I just can’t see it.
Please help if you can, or tell me to get lost if its not worth it.
I have drop down select boxes that looks like the example below.
<select style=“width: 630px” name=“Partopt” size=“1”>
<option value=“10.00”>select part one</option>
<option Selected value=“15.00”>select part two</option>
<option value=“20.00”>select part three</option>
<option value=“25.00”>select part four</option>
I would like to control the information in the Option tags with a mySQL database. So, I created a database table that looks like this…
DB Name = Partopts
part01 | 10.00 | select part one
part02 | 15.00 | select part two
part03 | 20.00 | select part three
part04 | 25.00 | select part four
So, what is happening on my web page is I’m using drop down boxes like above with multiple parts in multiple places on multiple pages. When it comes time to update my prices and descriptions, it becomes a serious undertaking that is long, tedious, and hard to do without messing something up. So, I though it would be nice to keep all of my information in one database so that I only have to update it once. (instead of multiple places)
Is there an easy way that a noob like me can fill in the option boxes with proper Price and Desc from the mySQL table that I created? Then with variables in the Option boxes, all I have to do is edit the info in the database.
Any help would be greatly appreciated.
Thank You in advance!