<html>
<head>
<style type="text/css">
<!--
body {
background-color: #110f0c;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<font color="#990000">
<link rel="stylesheet" href="loginstyle.css" type="text/css">
<?php
include "connect.php";
if (isset($_POST['submit'])) // name of submit button
{
$player=$_POST['player'];
$password=$_POST['password'];
$player=strip_tags($player);
$password=md5($password);
$query = "select * from km_users where playername='$player' and password='$password' and validated='1'";
$result = mysql_query($query) or die("No te Gusta") ;
$result2=mysql_fetch_array($result);
if($result2)
{
session_start();
$_SESSION['player']=$player;
print "logged in successfully<br><br>";
print "<A href='index.php'>Go to Admin Panel</a>";
}
else
{
echo "<center><table width='750' height='144'><td>";
include 'top.php'; // top
echo "</td></table>";
echo "<table width='750' height='30'><td width='750'><center><img src='images/statusbar.jpg'>";
echo "<center><br><table class='maintable' width='750' height='500'>";
echo "<td>";
print "<center>Wrong username or password or non-activated account.";
print "<center><A href='index.php'>Back</a></center>";
echo "</td></table>";
}
}
?>
</body>
</html>
authenticate.php
<?php
parse_str("$QUERY_STRING");
$db = mysql_connect("localhost", "root", "stars") or die("Could not connect.");
if(!$db)
die("no db");
if(!mysql_select_db("monster",$db))
die("No database selected.");
if(!get_magic_quotes_gpc())
{
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
?>
connect.php
i know its written horribly but it worked before i stopped workin on it for a while