X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id CAB04D1C4B7 for ; Tue, 5 Aug 2003 12:41:16 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 07023-02 for ; Tue, 5 Aug 2003 09:40:01 -0300 (ADT) Received: from mail3.tpgi.com.au (mail.tpgi.com.au [203.12.160.59]) by svr1.postgresql.org (Postfix) with ESMTP id 6F2C0D1C7EF for ; Tue, 5 Aug 2003 09:41:04 -0300 (ADT) Received: from 192.168.0.4 (220-244-72-6.tpgi.com.au [220.244.72.6]) by mail3.tpgi.com.au (8.11.6/8.11.6) with ESMTP id h75Cf4k27606 (using TLSv1/SSLv3 with cipher RC4-MD5 (128 bits) verified NO); Tue, 5 Aug 2003 22:41:04 +1000 From: "Alastair G. Hogge" To: darcy@PyGreSQL.org, pgsql-interfaces@postgresql.org Subject: Re: Seeking PyGreSQL help Date: Tue, 5 Aug 2003 22:41:10 +1000 User-Agent: KMail/1.5.3 References: <200308051816.06256.agh@tpg.com.au> <200308050510.39725.darcy@PyGreSQL.org> <200308052009.47746.agh@tpg.com.au> In-Reply-To: <200308052009.47746.agh@tpg.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308052241.10612.agh@tpg.com.au> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/16 X-Sequence-Number: 4370 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.