$pwd = $_REQUEST['pwd'];
$fname = $_REQUEST['fname'];
$minitial = $_REQUEST['minitial'];
$lname = $_REQUEST['lname'];
$sex = $_REQUEST['sex'];
$bmon = $_REQUEST['bmon'];
$bday = $_REQUEST['bday'];
$byear = $_REQUEST['byear'];
if ($bmon ==! "0") {
$birth = $byear."-".$bmon."-".$bday;
}
$time = time();
$joined = date("Y-m-d", $time);
$memberid = $_REQUEST['memberid'];
$ev_int = $_REQUEST['ev_int'];
$rem_int = $_REQUEST['rem_int'];
$email = $_REQUEST['email'];
$chk_set = $_REQUEST['chk_set'];
if ($chk_set == "True") {
$viewlist = $_REQUEST['viewlist'];
if ($viewlist == "1") {$chk_vwlist = "checked";}
$viewpics = $_REQUEST['viewpics'];
if ($viewpics == "1") {$chk_vwpics = "checked";}
$viewclsfd = $_REQUEST['viewclsfd'];
if ($viewclsfd == "1") {$chk_vwclsfd = "checked";}
} else {
$chk_vwlist = "checked";
$chk_vwpics = "checked";
$chk_vwclsfd = "checked";
}
$Edit = $_REQUEST['Edit'];
if ($Edit == 'True') {
if ($memberid == "") {
$memmsg = "**Please specify your desired WonderList ID**.";
$req_err = "True";
}
if (strlen($pwd) < 6) {
$pwdmsg = "**You must enter a minimum 6 character password.**";
$req_err = 'True';
}
if ($email == "") {
$emailmsg = "**Email address is a required field.**";
$req_err = 'True';
}
if ($fname == "") {
$fnamemsg = "**First name is a required field.**";
$req_err = 'True';
}
if (($bmon != "") and ($bday != "")) {
$date_check=checkdate($bmon,$bday,2008);
if ($date_check != "1") {
$bdaymsg = "**Birthday entered is an invalid date.**";
$req_err = 'True';
}
}
if ($req_err ==! 'True') {
$req_err = 'False';
}
}
?>
if ($req_err == 'False') {
if ($ev_int == '') {$ev_int = '30';}
include("conn.php");
$query = "SELECT member_id from member where member_id = '$memberid'";
$result = mysql_db_query($db, $query);
if (mysql_num_rows($result) == 0) {
include("conn.php");
$query2 = "INSERT INTO member VALUES ('$fname', '$minitial', '$lname', '$sex', '$birth', '$joined', '$memberid', '$ev_int', '$rem_int', '$pwd', '$email', '$viewlist', '$viewpics', '$viewclsfd')";
$result2 = mysql_db_query($db, $query2);
} else {
echo "
** This WonderList ID is already taken, please specify a different ID. **
";
}
}
if ($result2) {
echo "
Welcome $fname! Your WonderList ID $memberid has been created. Your ID and password will be emailed to the address you entered.
Now get started! Here are just some of the things you can do with your WonderList:
* GiftList - Ok, so this is what we call the WonderList, it's a great way to give your friends and family a place to get gift ideas for you. You can build a list of specific things you want and include links to online retailer sites, or names of offline stores, plus price ranges, and a rank of how much you want each item. You can also list general ideas like general interests, favorite activities, things you collect, favorite sports teams, etc. You can even tell them where you'd like to get gift certificates from, and charities you'd like them to donate to on your behalf.
* GiftMates and GiftEvents - Build a list of your friends and family so you can keep up with their GiftEvents (birthdays, holidays and other occasions) so you'll always remember to get them a gift, a card, or just tell them you're thinking of them. But you'll never forget a special occasion again!
So what are you waiting for? Click here to Login now!";
$mailsubj = "Welcome to the WonderList!";
$mailbody = "Hi $fname,\n\nThanks for joining the WonderList! Your credentials are below.\n\nMember ID: $memberid\nPassword: $pwd\n\nBe sure to add all your gift ideas to your WonderList and give your Member ID to your friends and family so they can easily shop for the gifts you want to get! \n\nBut don't forget that your WonderList account also allows you to set up GiftMates and GiftEvents so you can easily keep track of your friends' and family's Birthdays and other occassions. And if you spread the word and have them sign up for a WonderList, it will make shopping for them that much easier for you, plus they'll love what you get them!\n\nWe look forward to seeing you on http://www.wonderlist.net soon!";
mail ($email, $mailsubj, $mailbody);
exit;
}
?>
Please fill out all required fields below. Required fields are in red.