Code: Select all
<?php
include 'connect.php';
session_start();
if (isset ($_POST['submit']))
{
$player=$_POST['player'];
$player=$_POST['password'];
$playaer=strip_tags($player);
$playaer=strip_tags($password);
$password=md5 ($password) ;
$query = "select name, password from players where
name='$player' and '$password'";
$result = mysql_query($query) or die ("Could not query player");
$result2 = mysql_fetch_array($result);
if ($result2)
{
$_SESSION['player']=$player;
echo "<big> Log in in succesfully</big><br>";
echo "<a href='battle.php'>continue";
}
else
{
echo"<big> wrong username or password.<a href='login.php>Try Again</a></big'> ";
}
}
?>