-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>> On Wednesday 05 May 2004 2:15 pm, as <ajay singh> said: as> I have wriiten a Python Script, which runs through a as> Webserver. The script generates a form, where the user as> feeds data and submits the form. The values submitted as> by the user, populates a MySql database. as> as> The problem is: as> as> After submitting the values, the database gets as> updated, but an error is generated which is quoted as> below, as seen in the browser: as> as> as> ------------------------------------------------ as> CGI Error as> The specified CGI application misbehaved by not as> returning a complete set of HTTP headers. The headers as> it did return are: as> ----------------------------------------------- as> as> as> The Python code is as below: as> as> -------------------------------------------- as> as> #!c:\python23\python as> import cgi as> import sys,os as> import string as> import MySQLdb as> db=MySQLdb.connect(host="localhost",user="root",passwd="",db="power") as> cursor=db.cursor() as> print "<html>" as> print "<head>" [snip] as> as> print "</body>" as> print "</html>" as> because of missing "Content-Type: text/html\n\n" before <html> also, where are cursor.close() and db.close() ???? Bhaskar - -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x01D5671C iD8DBQFAmL/BN1/UFgHVZxwRArpVAJ9UB4iAYmNnUmBhzbV7sI7iCdgThACeNona gkuTV/e3a4iEmHHKbPSnd24= =mdGT -----END PGP SIGNATURE----- _______________________________________________ ilugd mailinglist -- [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/[EMAIL PROTECTED]/