This PGD Topic on how to do so"); } if(!isSet($afor)) { die("Please select admin or super-admin"); } // if(!isSet($frq1) || !isSet($frq2) || !isSet($frq3)) { die("Please complete all free response questions"); } //compare existing field if(guidExistsInUserDB($guid) == 1) { die("Conflicting GUID Error: Please Contact Phantom139"); } //generate a 256 bit cookie for security //open a mysql connection, add the data, and then proceed $con = mysql_connect("localhost","",""); if(!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("phantom7_Quiz", $con); $q = "INSERT INTO User(Name, email, Age, Cell, T2User, GUID, ApplyingFor, QuestionsUsed, CompleteCT, Score, FRQ1, FRQ2, FRQ3) VALUES ('$name', '$mail', '$age', '$cell', '$t2n', '$guid', '$afor', '', '-1', '0', '$frq1', '$frq2', '$frq3')"; mysql_query($q) or die("ERROR: ".mysql_error()); $user = $guid; //with the FRQ's answered, and all of the other data completed, proceed to the quizzing! $qIndex = grabNonSelectedIndex($user); outputQuestion($user, $qIndex); ?>