Register yourself!

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['addAlum'] == TRUE){ $q_email = "SELECT fname from penngaa where email='".$_POST['email']."'"; $exists = query_NUM($q_email, $dblink); if(count($exists) != 0) { // Yikes, you've been here before! print_r("Looks like you've already registered, ".$exists[0][0].". If you want to update your info, click the 'Update' link above."); } else { // A-OK! $day = date('Y-m-d'); $fname = $_POST['fname']; $lname = $_POST['lname']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $country = $_POST['country']; $email = $_POST['email']; // check url if (eregi('http://', $_POST['url']) || $_POST['url'] == "") { $url= $_POST['url']; } else { $url = "http://".$_POST['url']; } $phone = $_POST['phone']; $occ = $_POST['occ']; $emp = $_POST['emp']; // check url if (eregi('http://', $_POST['empurl']) || $_POST['empurl'] == "") { $empurl= $_POST['empurl']; } else { $empurl = "http://".$_POST['empurl']; } $dmd = $_POST['dmd']; $cggt = $_POST['cggt']; $phd = $_POST['phd']; $friend = $_POST['friend']; $wug = $_POST['wug']; $wg = $_POST['wg']; $sasug = $_POST['sasug']; $sasg = $_POST['sasg']; $seasug = $_POST['seasug']; $seasg = $_POST['seasg']; $yearGrad = $_POST['gradYear']; $mentor = $_POST['mentor']; $helpout = $_POST['helpout']; $getNews = $_POST['news']; $showloc = $_POST['showloc']; $showemail = $_POST['showemail']; $showjob = $_POST['showjob']; $datetime = date("Y-m-d H:m:s"); $q_insert = "INSERT into penngaa (fname, lname, city, state, zip, country, email, url, phone, occ, emp, empurl, dmd, cggt, phd, friend, wug, wg, sasug, sasg, seasug, seasg, yeargrad, mentor, helpout, getnews, showemail, showloc, showjob, timestamp) VALUES "; $q_insert .= "('$fname', '$lname', '$city', '$state', '$zip', '$country', '$email', '$url', '$phone', '$occ','$emp', '$empurl', '$dmd', '$cggt', '$phd', '$friend', '$wug', '$wg', '$sasug', '$sasg', '$seasug', '$seasg', '$yearGrad', '$mentor', '$helpout', '$getNews', '$showemail', '$showloc', '$showjob', '$datetime')"; query_NUM($q_insert, $dblink); $q_query = "SELECT fname, lname, city, state, zip, country, email, url, phone, occ, emp from penngaa where id='".mysql_insert_id()."'"; $a = query_NUM($q_query, $dblink); $smarty->assign('fname', $fname); $smarty->assign('a',$a[0]); $smarty->display('added.tpl'); } } else { if($_POST['submit'] == "Verify") { $privatekey = "6LdTxwEAAAAAAEb-rt7GILLyk2Ca-TUzYOipCiZ5"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { //tried recaptcha and failed echo "
"; echo "

"; echo recaptcha_get_html($publickey); echo "

"; echo "

"; echo ""; echo "

"; echo "
"; echo "

There was a problem with your anti-spam verification entry. Please try again.

"; echo "Problems registering?"; } else { // Render template -- recaptcha success $smarty->display($prefix."smarty/templates/alumAdd.tpl"); } } else { //first time here echo "
"; echo "

"; echo recaptcha_get_html($publickey); echo "

"; echo "

"; echo ""; echo "

"; echo "
"; echo "Problems registering?"; } } ?>

No Comment

Comments are closed.