syntax error, unexpected T_VARIABLE
<?php
include_once "scripts/connect_to_mysql.php";
if (isset($_post['firstname'])){
$firstname = $_post['firstname'];
$lastname = $_post['lastname'];
$country = $_post['country'];
$city = $_post['city'];
$town = $_post['town'];
$username = $_post['username'];
$email = $_post['email'];
$confirmemail = $_post['confirmemail'];
$password = $_post['password'];
$confirmpassword = $_post['confirmpassword'];
$website = $_post['website'];
$youtube = $_post['youtube'];
$xfire = $_post['xfire'];
$firstname = stripslashes($firstname);
$lastname = stripslashes($lastname);
$country = stripslashes($country);
$city = stripslashes($city);
$town = stripslashes($town);
$username = stripslashes($username);
$email = stripslashes($email);
$confirmemail = stripslashes($confirmemail);
$password = stripslashes($password);
$confirmpassword = stripslashes($confirmpassword);
$website = stripslashes($website);
$youtube = stripslashes($youtube);
$xfire = stripslashes($xfire);
$firstname = strip_tags($firstname);
$lastname = strip_tags($lastname);
$country = strip_tags($country);
$city = strip_tags($city);
$town = strip_tags($town);
$username = strip_tags($username);
$email = strip_tags($email);
$confirmemail = strip_tags($confirmemail);
$password = strip_tags($password);
$confirmpassword = strip_tags($confirmpassword);
$website = strip_tags($website);
$youtube = strip_tags($youtube);
$xfire = strip_tags($xfire);
$sql_email_check = mysql_query("SELECT email FROM members WHERE email='$email'");
$email_check = mysql_num_rows($sql_email_check);
if ((!$firstname)||(!$lastname)||(!$country)||(!$city)||(!$town)||(!$username)||(!$email)||(!$confirmemail)||(!$password)||(!$confirmpassword)
$errormsg = 'Error: The following information is required<br><br>';
if(!$firstname){
$errormsg = '* First Name';
}
if(!$lastname){
$errormsg = '* Last Name';
}
if(!$country){
$errormsg = '* Country';
}
if(!$city){
$errormsg = '* City';
}
if(!$town){
$errormsg = '* Town';
}
if(!$username){
$errormsg = '* Username';
}
if(!$Email){
$errormsg = '* Email';
}
if(!$confirmemail){
$errormsg = '* Confirm Email';
}
if(!$password){
$errormsg = '* Password';
}
if(!$confirmpassword){
$errormsg = '* Confirm Password';
}
} else if ($email !=$confirmemail){
$errormsg = 'Error: The emails do not match<br>';
} else if {$password !=$confirmpassword){
$errormsg = 'Error: Passwords do not match<br>';
}else if ($email_check > 0){
$errormsg = 'Error: Email is already in use<br>';
}else{
$firstname = mysql_real_escape_string($firstname);
$lastname = mysql_real_escape_string($lastname);
$country = mysql_real_escape_string($country);
$city = mysql_real_escape_string($city);
$town = mysql_real_escape_string($town);
$username = mysql_real_escape_string($username);
$email = mysql_real_escape_string($email);
$confirmemail = mysql_real_escape_string($confirmemail);
$password = mysql_real_escape_string($password);
$confirmpassword = mysql_real_escape_string($confirmpassword);
$website = mysql_real_escape_string($website);
$youtube = mysql_real_escape_string($youtube);
$xfire = mysql_real_escape_string($xfire);
$firstname = eregi_replace("`","",$firstname);
$lastname = eregi_replace("`","",$lastname);
$country = eregi_replace("`","",$country);
$city = eregi_replace("`","",$city);
$town = eregi_replace("`","",$town);
$username = eregi_replace("`","",$username);
$email = eregi_replace("`","",$email);
$confirmemail = eregi_replace("`","",$confirmemail);
$password = eregi_replace("`","",$password);
$confirmpassword = eregi_replace("`","",$confirmpassword);
$website = eregi_replace("http://","",$website);
$youtube = eregi_replace("http://www.youtube.com/user/","",$youtube);
$xfire = eregi_replace("`","",$xfire);
$db_password = md5($password);
$sql = mysql_query("INSERT INTO members (firstname,lastname,country,city,town,username,email,password,website,youtube,xfire)
VALUES('$firstname','$lastname','$country','$city','$town','$username','$email','$db_password','$website','$youtube','$xfire')")
or die (mysql_error());
$id = mysql_insert_id();
mkdir("members/$id",0755);
$to = "email";
$from = "admin@fragtalk.org";
$subject = "FragTalk Account Activation";
$message = "Hi $firstname,
You recently signed up for an account on FragTalk. All you now need to do is activate your account. Click the link below to activate it.
http://www.fragtalk.org/activation.php?id=$id&sequence=$db_password
If the above link is not an active link, please copy and paste it into your browsers address bar.
After your activation is successful, you can log in using the following information:
Username:$username
Password:$password
We look forward to seeing you on our website!
Kind Regards,
Frag Talk";
$headers = "From: $from\r\n";
$headers = "content-type: text\r\n";
$to = "$to";
mail($to,$subject,$message,$headers);
$msgToUser = "<h2>One Last Step - Activate Through Email</h2><br><h4>Okay $firstname, one last step left to verify your email identity.</h4><br>In a moment, you will receive an email from us, with activation instructions enclosed. If you don't get the email, contact the site admin.";
include_once "msgToUser.php";
exit();
}
} else {
$errormsg = "Fields marked with an [*] are required.";
$firstname = "";
$lastname = "";
$country = "";
$city = "";
$town = "";
$username = "";
$email = "";
$confirmemail = "";
$password = "";
$confirmpassword = "";
$website = "";
$youtube = "";
$xfire = "";
}
?>
Does anyone have an idea of what it could be?
Regards,
Ash
Help



















