I've got an SQL database im doing some queries on and filling in a dropdown box with the code.
It's a select/combo box. It returns my database fields.
red black green.
In the source code i modified开发者_如何学编程 the query to get a second field in the same table. red.jpg black.jpg green.jpg.
How can i at runtime display a picture of a red shirt using the onChange() function in javascript? I found this online example useful javascriptkit .com/script/cut173.shtml
$interface is my sql query pic1 is the image being changed the html code looks like this Choosered green black
heres the snippets. any help is greatly appreciated. http://pastebin.com/mgqrEiJu
This should solve your problem. Loop through all the records and print out <option value="$url">$name</option>
精彩评论