Yes...I didn't change anything. The first account I created, works. When I had my wife try it, the register now works (displays race chosen in the db), but when logging in, it says wrong username or password.hallsofvallhalla wrote:are you converting your password on log in to md5 also?
authenticate.php
Code: Select all
<link href="style.css" rel="stylesheet" type="text/css" />
<STYLE type="text/css">
<!--
BODY { background-image:url(loginClear.png);
background-repeat:no-repeat;
background-position:center;
background-attachment:fixed }
-->
</STYLE>
<body bgcolor="black">
<body text="white">
<div id="successfull">
<?php
include_once 'connect.php';
session_start();
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'";
$result = mysql_query($query) or die("Could not query players");
$result2 = mysql_fetch_array($result);
if ($result2)
{
/* adding last login */
/*end last login */
$_SESSION['player']=$player;
sleep(4);
header("Location: http://localhost/mythuto/index.php"); /* Redirect browser */
}
else
{
echo "<A href='login.php'>Back to login</a>";
}
}
?>
</div>
</body>
</body>