I think I can rule out the form being the problem. Here is the link to the form.
http://www.texascaching.com/index.php?page=register
try to fill it out and register, for some reason it won't let you. It was working ealier.
<?
include 'dbinfo.inc.php';
// Define post fields into simple variables
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$username = $_POST['username'];
$city = $_POST['city'];
$zipcode = $_POST['zipcode'];
$cords = $_POST['cordv'];
$cords = $_POST['lat1'];
$cords = $_POST['lat2'];
$cords = $_POST['cordh'];
$cords = $_POST['long1'];
$cords = $_POST['long2'];
/* Let's strip some slashes in case the user entered
any escaped characters. */
$first_name = stripslashes($first_name);
$last_name = stripslashes($last_name);
$email = stripslashes($email);
$username = stripslashes($username);
$city = stripslashes($city);
$zipcode = stripslashes($zipcode);
?>
<!--ERROR TABLE-->
<table class='fullbox' width='500' height='105' align='center'>
<tr>
<td>
<?
/* Do some error checking on the form posted fields */
if((!$first_name) || (!$last_name) || (!$email_address) || (!$username) || (!$city) || (!$zipcode)){
echo '<h1>You did not submit the following required information!</h1><br />';
if(!$first_name){
echo "<font class='errortext'>*First Name* is a required field. Please enter it below.<br />";
}
if(!$last_name){
echo "<font class='errortext'>*Last Name* is a required field. Please enter it below.<br />";
}
if(!$email){
echo "<font class='errortext'>*Email Address* is a required field. Please enter it below.<br />";
}
if(!$username){
echo "<font class='errortext'>*Desired Username* is a required field. Please enter it below.<br />";
}
if(!$city){
echo "<font class='errortext'>*City* is a required field. Please enter it below.<br />";
}
if(!$zipcode){
echo "<font class='errortext'>*Zipcode* is a required field. Please enter it below.<br />";
}
if (!isset($_POST['terms']))
{
echo "<font class='errortext'>*You must accept the Terms & Conditions*.<br />";
}
?>
</td>
</tr>
</table>
<table border='0' cellpadding='0' cellspacing='0' width='500' align='center'><tr><td><img alt='' border='0' height='7' src='http://images.weathertrackcast.com/themes/smooth_gray/misc/1pixel.gif' width='7'></td><td class=shadow-mid width='100%'><img alt='' border='0' height='7' src='http://images.weathertrackcast.com/themes/smooth_gray/misc/1pixel.gif' width='7'></td><td><img alt='' border='0' height='7' src='http://images.weathertrackcast.com/themes/smooth_gray/misc/1pixel.gif' width='7'></td></tr></table></center>
<br />
<?
include 'register_form.php'; // Show the form again!
/* End the error checking and if everything is ok, we'll move on to
creating the user account */
exit(); // if the error checking has failed, we'll exit the script!
}
/* Let's do some checking and ensure that the user's email address or username
does not exist in the database */
$sql_email_check = mysql_query("SELECT email FROM users
WHERE email='$email'");
$sql_username_check = mysql_query("SELECT username FROM users
WHERE username='$username'");
$email_check = mysql_num_rows($sql_email_check);
$username_check = mysql_num_rows($sql_username_check);
if(($email_check > 0) || ($username_check > 0)){
echo "<h1>Please fix the following errors:</h1> <br />";
if($email_check > 0){
echo "<font class='errortext'>This email address has already registered. Please submit a different Email address!<br />";
unset($email_address);
}
if($username_check > 0){
echo "<font class='errortext'>The username you have selected has already been taken by another memeber. Please choose a different Username!<br />";
unset($username);
}
include 'register_form.php'; // Show the form again!
exit(); // exit the script so that we do not create this account!
}
/* Everything has passed both error checks that we have done.
It's time to create the account! */
/* Random Password generator.
http://www.phpfreaks.com/quickcode/Random_Password_Generator/56.php
We'll generate a random password for the
user and encrypt it, email it and then enter it into the db.
*/
function makeRandomPassword() {
$salt = "abchefghjkmnpqrstuvwxyz0123456789";
srand((double)microtime()*1000000);
$i = 0;
while ($i <= 7) {
$num = rand() % 33;
$tmp = substr($salt, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
$random_password = makeRandomPassword();
$db_password = md5($random_password);
// Enter info into the Database.
$sql = mysql_query("INSERT INTO users (first_name, last_name,
email, username, password, city, zipcode, cordv, lat1, lat2, cordh, long1, long2, signup_date)
VALUES('$first_name', '$last_name', '$email',
'$username', '$db_password','$city','$zipcode','$cordv',
'lat1','$lat2','$cordh','$long1','$long2', now())")
or die (mysql_error());
if(!$sql){
echo "<font class='errortext'>There has been an error creating your account. Please contact the webmaster.";
} else {
$userid = mysql_insert_id();
// Let's mail the user!
$subject = "Texas Geocaching Organization Account Activation";
$message = "Dear $first_name $last_name,
Thank you for registering at our Texascaching.com!
You are two steps away from logging in and accessing our exclusive members area.
To activate your membership,
please click here: http://www.texascaching.com/activate.php?id=$userid&code=$db_password
Once you activate your memebership, you will be able to login
with the following information:
Username: $username
Password: $random_password
Once you have succesfully activated your account and logged in. You can go to your account to update your profile settings.
Thanks!
Texas Geocaching Organization Staff
This is an automated response, please do not reply!";
mail($email_address, $subject, $message,
"From: Texas Geocaching Organization<noreply@texascaching.com>\n
X-Mailer: PHP/" . phpversion());
echo "<font class='contenttext'>Thank You for registering with us! Your membership information has been mailed to your email address!
Please check it and follow the directions to activate your account!";
}
include ('footer.php') ?>
-Thanks