You requested I post the full code here, I have checked with the code to find the bracket but have come up empty handed. Here is the code
Code: Select all
<?php
include 'connect.php';
?>
<?php
$username=$_POST['user'];
$userpass=$_POST['password'];
$userpass2=$_POST['pass2'];
$username=strip_tags($username);
$usermail=$_POST['email'];
$usermail=strip_tags($usermail);
if ($usermail == "")
{
echo "You did not enter a email address.";
echo "<a href='register.php'>Please start over.</a></br>";
exit ;
}
if ($userpass == $userpass2)
{
$isuser="SELECT * from users where name='$username'";
$isuser2=mysql_query ($isuser) or die("Could not query users table.");
$isuser3=mysql_fetch_array($isuser2);
if(!$_POST['password'] || !$_POST['pass2'])
{
print "You did not eneter a password.";
echo "<a href='register.php'>Please start over.</a></br>";
exit ;
}
else if ($isuser || strlen($username)>21 || strlen($username) <1)
{
print "The user name you have chosen is already chosen or you have exceeded 21 letters. User names should be no less than 6 letter.";
echo "<a href='register.php'>Please start over.</a></br>";
exit ;
}
else
{
$ismail="SELECT * from users where email='$usermail'";
$ismail2=mysql_query ($ismail) or die ("Unable to query passphrase.");
$ismail3=mysql_fetch_array($ismail2);
if ($ismail3)
{
print "There is already a user with this email address.";
echo "<a href='register.php>Please start over.</a></br>'";
exit ;
}
else
{
$userpass=md5 ($userpass);
$SQL = "INSERT into users (name,password,email,level,exper) VALUES ('$username','$userpass','$usermail,'1','0'')";
mysql_query ($SQL) or die ("Could not register at this time.");
print "Thank you for registering.";
}
}
}
else
{
print "The passwords you entered did not match.";
echo "<a href='register.php'>Please start over.</a></br>";
exit ;
}
echo "<a href='login.php'>Please Login</a></br>"
?>JH