# Collection of code snippets by Arne Vajhøj 
# (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import cgi
import pymysql

q = cgi.parse()
f1 = q['f1'][0]
con = pymysql.connect(host='localhost',user='root',password='',db='test')
c = con.cursor()
c.execute('DELETE FROM t1 WHERE f1 = %s', (f1,))
c.close()
con.commit()
con.close()
print('Location: http://arne1.vajhoej.dk/cgi-bin/showpy')
print('')
