MySQL

Python Project – Online Quiz Management – Adding Quizzes

Now it’s time to add some functionality to add quizzes. So first we have to make a MySQL table to hold the main quiz text: (view structure after the table is created) Now this is where the questions for the quiz will be entered. Please note, that this is a “parent/child” type database setup, the […]

Continue Reading

Python Project – Online Quiz Management – Add Edit Delete

The following code will allow you to: -Enter (insert) new quizzes -Modify (Update) existing ones -Delete quizzes you don’t want. (Click image to see it in action – login with “demo” and “123”) Click here for the main project link #!/usr/bin/python print “Content-type: text/html\n\n” print “<html>” print “<head>” print “<title>Enter Quizes</title>” print “</head>” print “<body>” […]

Continue Reading

How To Use Python To Update MySQL

In this post we will be updating our MySQL database using Python. #!/usr/bin/python print “Content-type: text/html\n\n” print “<html>” print “<head>” print “<title>Update Provider</title>” print “</head>” print “<body>” #GLOBAL VARIABLES USERNAME = ‘username’ PASSWORD = ‘password’ DB = ‘database’ import MySQLdb import os # Import modules for CGI handling import cgi, cgitb def init(): #read the […]

Continue Reading