Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\wamp\www\stillstanding\reguser.php on line 17
I checked that line but I can't see anything wrong with it but here is my code
Code: Select all
<?php
include_once 'connect.php';
?>
<?php
include 'logo.php';
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<div id="reguser" align="center">
<?php
$player=$_GET['player'];
$password=$_GET['password'];
$pass2=$_GET['pass2'];
$email=$_GET['email'];
if($email == "")
{
echo "You did not enter an email!<br/><a href="register.php"><input type="submit" value="Go Back" name="submit" />";
exit;
}
if($pass2 != $password)
{
echo "Your passwords did not match!<br/><a href="register.php"><input type="submit" value="Go Back" name="submit" />";
exit;
}
if($player == "")
{
echo "You did not enter a username!<br/><a href="register.php"><input type="submit" value="Go Back" name="submit" />";
exit;
}
if ($password == "")
{
echo "You did not enter a password!<br/><a href="register.php"><input type="submit" value="Go Back" name="submit" />";
exit;
}
if($pass2 == "")
{
echo "You did not retype your password!?<br/><a href="register.php"><input type="submit" value="Go Back" name="submit" />";
exit;
}
if($password == $pass2)
{
$isplayer="SELECT * from players where name='$player'";
$isplayer2=mysql_query($isplayer) or die("Could not get players");
$isplayer3=mysql_fetch_array($isplayer2) or die("Could not get array");
}
if($isplayer3)
{
echo "There is already someone with that name!<br/><a href="register.php"><input type="submit" value="Go Back" name="submit" />";
exit;
}
else
{
$password=md5($password);
$mysql="INSERT into players(name, password, email, level, exper, hpoints, attack, defence, damage) VALUES ($name, $password, $email, 1, 0, 30, 5, 5, 5)";
mysql_query($mysql) or die("Could not update players");
echo "Thanks for registering!<br/><a href="login.php"><input type="submit" value="Login" name="submit" />";
}
?>