The reason is, that you do not have your characters info put in. Go into your DB and find your players tab than find the character you want to add stats for and click insert and add all the stats for that player. Hope that helped.
Last edited by n04h on Tue Feb 22, 2011 3:41 pm, edited 1 time in total.
My authenticate.php code is as listed below, but when I try to login at localhost/tutorial/login.php I get this...
( ! ) Notice: Undefined index: password in C:\wamp\www\Tutorial\authenticate.php on line 8
Call Stack
# Time Memory Function Location
1 0.0017 681496 {main}( ) ..\authenticate.php:0
Wrong username or password.Try Again
I made a new account with a password just to make sure it was correct, but still no luck.
if (isset($_POST['submit']))
{
$player=$_POST['player'];
$password=$_POST['password'];
$player=strip_tags($player);
$password=strip_tags($password);
$password=md5($password);
$query = "select name,password from players where name='$player' and password='$password'";
$result = mysql_query($query) or die("Could not query players");
$result2 = mysql_fetch_array($result);
if ($result2)
{
$_SESSION['player']=$player;
echo "<big>Logged in successfully<br>";
echo "<A href='battle.php'>Continue</a></big>";
}
else
{
echo "<big>Wrong username or password.<A href='login.php'>Try Again</a></big>";
}
}
?>