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

q = os.getenv('WWW_QUERY_STRING')
f1 = q[3:]
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:81/htbin/showpy')
print('')
