View Single Post
Old 05-05-2009, 08:21 PM   #1 (permalink)
xxtokerxx
The Visitor
Newcomer 
 
Join Date: May 2009
Posts: 1
Thanks: 0
xxtokerxx is on a distinguished road
Default Drop down relationship to SQL?

Hope you can help me on this one,

I want to create a drop down list (1 field) which ties into a database(SQL?) essentially this is the HTML variation of what I have but I want the site to be more dynamic.

<form name="nav">
<select style=
"font-size:12px;
color:#006699;
font-family:verdana;
background-color:#ffffff;
" name="menu" onChange="location=document.nav.menu.options[document.nav.menu.selectedIndex].value;">
<option value=''>Please choose</option>
<option value="test1.html">test1</option>
<option value="test2.html">test2</option>
<option value="test3.html">test3</option>
</select>
</form>



When the user clicks on test1 they are taking to test1.html


Essentially, I want the drop down to "autoselect" the fields from the database so all the options are available without addition of hard coding.

and then require the contents of this "entry" to display on the website.


Any ideas?

BTW I am not too good with sql, php etc. just learning
xxtokerxx is offline  
Reply With Quote