For students

template_dir = $prefix."smarty/templates"; $smarty->compile_dir = $prefix."smarty/templates_c"; $smarty->cache_dir = $prefix."smarty/cache"; $smarty->config_dir = $prefix."smarty/configs"; // Default action is to display entries in DB $dblink = connectToSQL("db373.perfora.net", "dbo166284576", "aBRZEJm5", "db166284576"); //print_r($_POST); // Check a hidden field value from post if($_POST['studentAdd'] == TRUE){ $day = date('Y-m-d'); // Tar the start and end dates $fname = $_POST['fname']; $lname = $_POST['lname']; $hometown = $_POST['hometown']; $email = $_POST['email']; $url= $_POST['url']; $yearGrad = $_POST['gradYear']; $program = $_POST['program']; $favcourse = $_POST['favcourse']; $about = $_POST['about']; $datetime = date("Y-m-d H:m:s"); $q_insert = "INSERT into pcga_mentor (fname, lname, email, url, program, gradyear, hometown, favcourse, about, timestamp) VALUES ('$fname', '$lname', '$email', '$url', '$program', '$yearGrad', '$hometown', '$favcourse', '$about', '$datetime')"; query_NUM($q_insert, $dblink); $smarty->assign('fname', $fname); $smarty->display('studentAdded.tpl'); } else { $smarty->assign('programs', array( "DMD" => "DMD", "CGGT" => "CGGT", "PHD" => "PHD") ); // Render template $smarty->display('studentAdd.tpl'); } ?>

No Comment

Comments are closed.