On Tuesday, 05 August 2003 20:09, Alastair G. Hogge wrote:
OK, I've found my problem.
my code:
form = cgi.FieldStorage() # Grab data from web page form
db = _pg.connect("mydb", "myhost") # connect to database
temp = form['name'].value
db.query("INSERT INTO test VALUES (temp, 'none')")
db.close()

The following is to show that data has been recived from the web form.
Which works. temp will display what ever I type in the form, however, when I
try to store it in the database above I get problems.
print "Content-Type: text/html\n\n"
print temp

"db.query("INSERT INTO test VALUES (temp, 'none')")" is the line causing the
problem. The internel server error from apache.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 9 | next ›
Discussion Overview
grouppgsql-interfaces @
categoriespostgresql
postedAug 5, '03 at 8:16a
activeAug 6, '03 at 1:23a
posts9
users2
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase