Old stuff/old_sites/newepik/newauth.php
(Deskargatu)
<?php
session_start();
$nick = $_POST['nick'];
$password = $_POST['password'] or $password="";
if (!empty($nick) and !empty($password))
{
$query = "SELECT * FROM membres WHERE pseudo='$nick'";
$result=mysql_query($query) or die("FATAL: ".mysql_error()."<br>$query");
if ($row = mysql_fetch_array($result)) { $pass=$row[2]; $email = $row[3]; $axx =$row[9]; }
if (strcmp($pass,md5($password))==0)
{
$_SESSION['nick'] = $nick;
$_SESSION['email'] = $email;
$_SESSION['axx'] = $axx;
}
else { $identified="Failed"; unset($axx); unset($email); unset($nick);}
}
elseif (!empty($_SESSION['nick']))
{
$nick = $_SESSION['nick'];
$email = $_SESSION['email'] ;
$axx = $_SESSION['axx'] ;
}
?>