Code: Select all
<?php
include connect.php
?>
<?php
$player = $_POST['player'];
$password = $_POST['password'];
$pass2 = $_POST['pass2'];
$player = strip_tags($player);
$email = $_POST('email');
$email = strip_tags($email);
if ($email == "")
(
echo "You didn't enter a email address!<br>";
echo "<A href 'register.php'>Go Back</a";
exit;
)
if ($password==$pass2)
(
$isplayer="Select *from players where name='$player'";
$isplayer2=mysql_query($isplayer) or die ("could not query players table");
$isplayer3=mysql_fetch_array($isplayer2);
if[!$_post('password') || !$_POST('pass2'])
(
print "You did not enter a password!<br>";
echo "<A href='register.php'>Go Back</a";
exit;
)
else if ($isplayer3 ||strlen($player)>21 || strlen($player<1;
(
print "There is already a player with that username or the name you specifified is over 16characters or less than one chartacter<br>";
echo "<A href='register.php'>Go Back</a>";
)
else
(
$isaddress="Select *from players where email='$email'";
$isaddress2=mysql_query($isaddress) or die ("could not query for passwords");
$isplayer3=mysql_fetch_array($isplayer2);
if($isaddress)
(
print "There is already a player with that e-mail address<br>";
echo "<A href='register.php'>Go Back</a>"
exit;
)
else
($password=md5($password);
$sql = "INSERT into players(name, password, email, level, exper) VALUES ('$player', '$password', '$email', '1', '0')";
mysql_query($sql) or die ("Could not register");
print "Thank you for registering!";
)
)
)
else
(
print ("your passwords didn't match or you did not enter a password")
echo "<A href='register.php'>gGo Back</a>"
exit;
)
Echo "<A href='login.php'>Login Page</a>"
?>
I checked the error and it said : " Parse error: syntax error, unexpected T_ECHO in C:\wamp\www\Tutorial\Reguser.php on line 15"
I checked line 15 and it's the same exact thing as in the tutorial and it still shows this error. Help?