session_start(); header("Cache-control: private"); // ie 6 fix for hitting back buttons.. require_once 'DB.php'; include("mySQLpref.php"); include("functions.php"); if (array_key_exists('email',$_GET)) { $_POST['email']=$_GET['email']; } $sa=""; if (array_key_exists('sa',$_GET)) { $sa=$_GET['sa']; } // define category from session variable - if available. If not, will print out drop down form below and // ask user to get the category. session_register('cat'); $category=$_SESSION['cat']; $replyUid=""; if(array_key_exists('ruid',$_GET)){ $replyUid=$_GET['ruid']; } if (array_key_exists('form_complete',$HTTP_POST_VARS)) { $error=""; // Check if all variables are good. $screenName=$_POST['screenName']; $password=$_POST['password1']; $email=$_POST['email']; $email=strtolower($email); // set to lowercase. if ((strlen($screenName)<5)) { $error="yes"; } if (((strlen($password))<5)||((strlen($_POST['password2']))<5)) { $error="yes"; } if ($_POST['password1']!=$_POST['password2']) { $error="yes"; } if (! preg_match('/@.+\..+$/',$email)) { $error="yes"; } // All good; if ($error!="yes") { //-----------MySQL Code------------------------------------------------------------- $db = DB::connect($dsn); chkSqlError($db); if (chkEmailExists($email)) { $errorCode="Sorry, there already exists a user with email address: $email
Click here to have your password sent to your email.
Or please create a new account with a different email address"; } else { $sessionID=session_id(); //code for sendmail //Save screen name, password, email, and sessionid to database //Calculate expiration date of link (7 days from today); $nowDate=getdate(); $curryear=$nowDate['year']; $currmonth=$nowDate['mon']; $currday=$nowDate['mday']; $hours = $nowDate["hours"]; $minutes = $nowDate["minutes"]; $seconds = $nowDate["seconds"]; //in case category not from session if ($category=="") { $category=$_POST['category']; } // expire day is one week later. $expDay=$currday+7; $timestamp=mktime($hours,$minutes,$seconds,$currmonth,$expDay,$curryear); $expDate=strftime("%Y--%m--%d",$timestamp); $sql=" INSERT INTO personals_user_tbl (category,expireDate,email,screenName,password,sessionID) VALUES (\"$category\", \"$expDate\", \"$email\", \"$screenName\", \"$password\",\"$sessionID\")"; $q=$db->query($sql); chkSqlError($db); $message=sendVerification($email,$replyUid,$sa); //// no sendmail if ($url_Prefix=="localhost:") { echo "This is a windows system, no sendmail so here is the email you would have received\n\n"; echo $message; exit; } header('Location:http://'.$url_Prefix.'/errorPage.php?errorCode='.$message); exit; } } } ?> Fourth Ring Personals New User

asian personals :: mobile wireless wap entertainment :: matchmaking :: online dating :: international singles personals