<input id="lastN" size="30" maxlength="50" type="text" name="lastN" required value=<?php echo getStudentLastNameByID($_SESSION["studID"]); ?> > </div> <div class="field fancy-form"> <label for="studID">Student ID</label> <input id="studID" size="30" maxlength="7" type="text" pattern="[A-Za-z]{2}[0-9]{5}" title="AB12345" name="studID" disabled value=<?php echo $_SESSION["studID"]; ?> > </div> <div class="field fancy-form"> <label for="email">E-mail</label> <input id="email" size="30" maxlength="255" type="email" name="email" required value=<?php echo getStudentEmailByID($_SESSION["studID"]); ?> > </div> <div class="field fancy-form"> <!-- Change Major- Value needs to be Shortened version for database efficiency --> <label for="major">Major</label> <select id="major" name = "major"> <option value="CMPE" <?php if (getStudentMajorByID($_SESSION["studID"]) == 'CMPE') { echo "selected"; } ?> >Computer Engineering</option> <option value="CMSC" <?php if (getStudentMajorByID($_SESSION["studID"]) == 'CMSC') {
session_start(); $debug = false; include '../../CommonMethods.php'; $COMMON = new Common($debug); //Include functions include "Functions.php"; if ($_POST["finish"] == 'Cancel') { $_SESSION["status"] = "none"; } else { //Grab all User data //Changed to function calls $firstn = getStudentFirstNameByID($_SESSION["firstN"]); $lastn = getStudentLastNameByID($_SESSION["lastN"]); $studid = $_SESSION["studID"]; $major = getStudentMajorByID($_SESSION["major"]); $email = getStudentEmailByID($_SESSION["email"]); $advisor = $_SESSION["advisor"]; if ($debug) { echo "Advisor ->" . $advisor . "<br>\n"; } //If student doesn't exist, create them. $apptime = $_SESSION["appTime"]; if ($_SESSION["studExist"] == false) { $sql = "insert into Proj2Students (`FirstName`,`LastName`,`StudentID`,`Email`,`Major`) values ('{$firstn}','{$lastn}','{$studid}','{$email}','{$major}')"; $rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]); } // ************************ Lupoli 9-1-2015 // we have to check to make sure someone did not steal that spot just before them!! (deadlock) // if the spot was taken, need to stop and reset if (isStillAvailable($apptime, $advisor)) { } else {