Error? [SOLVED]
Posted: Sat Jan 07, 2012 2:14 am
Here is the error I am getting for the code: Fatal error: Function name must be a string in /home/a7754873/public_html/reguser.php on line 6
Here is the code:
Any Help Here would be great!
Here is the code:
Code: Select all
<?php
include 'connect.php';
?>
<?php
$player=$_POST('uname');
$password=$_POST('password');
$pass2=$_POST('password2');
$player=strip_tags($player);
$email=$_POST('email');
$email=strip_tags($email);
if ($email == "")
{
echo "You did not Enter an Email!";
echo "<a href='register.php'>Go Back</a><br />";
exit;
}
if ($password==$password2)
{
$isplayer="SELECT * FROM Players WHERE name='$player'";
$isplayer2=mysql_query($isplayer) or die("Error, Unable to query Database");
$isplayer3=mysql_fetch_array($isplayer2);
if(!$_POST['password'] || !$_POST['password2'])
{
echo "You did not enter / incorrectly entered your password";
echo "<a href='register.php'>Go Back</a>";
exit;
}
else if($isplayer3 || strlen($player)>21 || strlen($player) <1)
{
echo "There is already a user with that name, please go back and try again.";
echo "<a href='register.php'>Go Back</a><br>";
exit;
}
else
{
$isaddress="SELECT * FROM players where email='$email'";
$isaddress2=mysql_query($isaddress) or die ("Unable to acces Password Database");
$isaddress3=mysql_fetch_array($isaddress2);
if ($isaddress3)
{
echo "There is already a player with that e-mail assress";
echo "<a href='register.php'>Go Back</a><br>";
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 ("Unable to register to databases");
echo "Thank you For Registering";
}
}
}
else
{
echo "Your Password didn't Match, or you did not enter a password";
echo "<a href='register.php'>Go Back</a><br>";
exit;
}
echo "<a href='login.php'>Login Now!</a><br>";
?>
Any Help Here would be great!