0) { $errMessage = "The username you have selected [$username] is already being used.
Please select another."; header("Location: $PHP_SELF?seed=".$_REQUEST{'seed'}."&cbpop=".$_REQUEST{'cbpop'}."&errMessage=$errMessage"); } else { // If so, insert to db, send email, log them in and take them to the main page $md5pass = md5($password); $expDate = (date("Y") + 1) . date("-m-d"); if ($optin) { $optin = 1; } $sql = "INSERT INTO users SET username='$username', password='$md5pass', email='$email', joined=NOW(), expDate='$expDate', optin='$optin';"; $res = mysql_query($sql) or die ("Invalid Query: ".mysql_errno().": ".mysql_error()."\n"); // email $headers = "MIME-Version: 1.0\r \n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\r \n"; $headers .= "From: \"Dustin Davis (LinkCloak)\" \r \n"; $headers .= "BCC: webmaster@linkcloak.com\r \n"; $headers .= "X-Mailer: LinkCloak.com"; $to = $email; $subject = "Linkcloak.com Registration Information"; $message = "Thank you for your signing up at LinkCloak.com! Below you will find your login information you have submitted:\n\n"; $message .= "\tUsername: $username\n"; $message .= "\tPassword: $password\n\n"; $message .= "If you have any questions or problems feel free to contact me anytime.\n\n"; $message .= "Thanks,\nDustin Davis\n"; $message .= "--\nLinkCloak.com"; mail ($to, $subject, $message, $headers); $PHP_AUTH_USER = $username; $PHP_AUTH_PW = $password; header("Location: http://linkcloak.com/ty2.php"); } } else { $javascript = "function Validate() { var d = document.form1; var rval = true; if (d.email.value == \"\") { alert (\"Your email address is required. Your privacy is important. Your email address will not be given away to anyone. It is used to send your account information to you and in case you forget your passwork on this site.\"); d.email.select(); rval = false; } if (d.password.value != d.pconfirm.value) { alert (\"Your passwords do not match. Please try again.\"); d.pconfirm.value = \"\"; d.password.select(); rval = false; } else if (d.password.value == \"\") { alert (\"You must enter a password.\"); d.password.select(); rval = false; } if (d.username.value == \"\") { alert (\"Please enter a username. You cannot gain access to LinkCloak.com without one.\"); d.username.select(); rval = false; } var AtSym = d.email.value.indexOf('@'); var Period = d.email.value.lastIndexOf('.'); var Space = d.email.value.indexOf(' '); var Lenght = d.email.value.length - 1; if ((AtSym < 1) || // '@' cannot be in first position (Period <= AtSym+1) || // Must be atleast one valid char btwn '@' and '.' (Period == Length ) || // Must be atleast one valid char after '.' (Space != -1)) // No empty spaces permitted { rval = false; alert('Please enter a valid email address.') d.email.select() } return rval; } "; $ptitle = "Thank you"; require "header.php"; ?>

In order to gain full access to LinkCloak.com, please select a user name and password. This information will be emailed to you for your records. Each field is required.

$errMessage
"; } ?>
Username:
Password:
Confirm Password
Email Address:
Email Opt-in: Check here to be notified of updates, new products
 I've been working on, and cool internet and affiliate marketing tools & tips.

If you have any questions please contact me any time at dustin@linkcloak.com

Home