<?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!
Last edited by OoZI on Thu Jan 12, 2012 3:47 pm, edited 1 time in total.
<?php
include 'connect.php';
?>
<?php
$player=$_POST['uname'];
$password=$_POST['password'];
$pass2=$_POST['password2'];
$player=strip_tags[$player]; *This is where the error is*
$email=$_POST['email'];
$email=strip_tags[$email];
<?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<br />";
echo "<a href='register.php'>Go Back</a><br>";
exit;
}
echo "<a href='login.php'>Login Now!</a><br>";
?>