#!/usr/bin/env python print "Content-type: text/html\n" import cgi, cgitb form = cgi.FieldStorage() #print "Hello, world!" response = form['id'].value #print "ID:" + str(response) import psycopg2 import psycopg2.extras fishercon = psycopg2.connect(user='chanch', password="racketm0a7k2i1", host='localhost', dbname = 'chanch') fishercur = fishercon.cursor(cursor_factory=psycopg2.extras.RealDictCursor) fishercur.execute("select * from pd_search where id = " + str(response)) singlerow = fishercur.fetchone() print "