#!/usr/local/bin/python3.3 """ Created on Wed Apr 12 19:08:38 2017 @author: Zhe """ #unsure of purpose import cgi import cgitb import pymysql cgitb.enable() print("Content-type: text/html\n") form = cgi.FieldStorage() def runQuery(query, user, passwd): connection = pymysql.connect(host="localhost",db="group9",user=user,passwd=passwd) cursor = connection.cursor() cursor.execute(query) res = cursor.fetchall() cursor.close() connection.close() return res print("""