Location: PHPKode > projects > Decider > decider/Login/intermediate.php
$_SESSION['username'] = $_POST['user'];
$_SESSION['userpass'] = $_POST['password'];
$_SESSION['authuser'] = 0;

//Check username and password information


$login_query = "select Id,password from analyst where User_Name='".$_SESSION['username']."'";
$login_result = mysql_query($login_query,$link);
$raw = mysql_fetch_array($login_result);

$db_password = $raw['password']; 

//converting input password to md5 format and aquire first 20 characters
$temp = md5($_SESSION['userpass']);
$in_password = substr($temp, 0, 20);

$check = strcmp($db_password, $in_password);

if ($check=="true"){
   $_SESSION['authuser'] = 1;
   $_SESSION['userid'] = $raw['Id']; 
} else {
   include "login.php";	
   echo '<div align="center"';
   echo "<p> Your user name or password may be incorrect! </p>";
   echo "</div>";
   //echo $db_password." ".$in_password;

<title>Decider - Information Gathering Assistant</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../common/styles1.css"/> 
<link rel="stylesheet" type="text/css" href="../common/styles.css"/> 


<div id='maindiv'  align="center" >
<form method="post" action="home.php">
<table width="800px">
		<td align="left" valign="top"><?php require('../common/top.html'); ?></td>

<table background="../common/tableback.png"  width="800px" height="800px" >
<tr><td><p class="label"> Wellcome <?php echo $_SESSION['username'];?> ...</p>
   <p class="label">Click here to proceed</p>
   <input type="submit" name="Ok" value="      Ok     " class="button">

Return current item: Decider