
March 6th, 2004, 06:34 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
As 2k said, there isn't really a lot to get stuck on here  but anyway here's a little example - this doesn't use any db since i don't have any data to populate this t with.
Code:
#!/usr/bin/env python
print 'Content-Type: text/html\n'
values = ['Name1', 'Name2', 'Name3', 'Name4']
print'<form name="form">'
print'<select name="names">'
print'<option selected>Netytan</option>'
for value in values:
print'<option>%s</option>' % value
print'</select>'
print'</form>'
Note: 'values' can be a simple cursor or list/tuple object. needs a little reworking if you want to use dictionaries but it shows you exactly what you need.... so, a loop
Mark.
__________________
programming language development: www.netytan.com – Hula
|