Hi, i currently have these 2 files:
#!C:\Python26\python.exe
#index.py
print 'Content-type: text/html\n\n'
print '<html><head>'
print '<title>My Page</title>'
print '</head><body>'
print '<h1>Powers of two</h1>\n<ol>'
print '<form action="sqr.py" method="post">'
print '<label>How many numbers?</label>'
print '<input type="text" name="b"/>'
print '</ol></body></html>'
and
#!C:\Python26\python.exe
#sqr.py
import cgi
a = cgi.FieldStorage()
b = a["b"]
print 'Content-type: text/html\n\n'
print '<html><head>'
print '<title>My Page</title>'
print '</head><body>'
print '<h1>Powers of two</h1>\n<ol>'
for n in range(1,b):
print '<li>'+str(2**n)+'</li>'
print '</ol></body></html>'
and it produces reasonable responses, except for when i press enter the page only shows the powers of two part, what can I do to fix this?