<?php
require("db/config.php");
session_start();
if(isset($_POST["btnLogin"]))
{
$nm=$_POST["txtUid"];
$pas=$_POST["txtPass"];
$q=mysql_query("select * from userinformationtb where user_id='$nm' and password='$pas'");
$data=mysql_fetch_array($q);
$_SESSION["seid"]=$data["user_id"];
// session_id();
if($nm==$_SESSION["seid"])
{
header("location:php/home.php");
//echo "valid";
}
else
{
echo "invalid";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link rel='nofollow' href="../css/style.css" rel="stylesheet" type="text/css" />
type="text/javascript" src="js/script.js">
type="text/javascript" src="js/cufon-yui.js">
type="text/javascript" src="js/arial.js">
type="text/javascript" src="js/cuf_run.js">
<link rel="stylesheet" rel='nofollow' href="css/validationEngine.jquery.css" type="text/css"/>
src="js/jquery-1.8.2.min.js" type="text/javascript">
src="js/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8">
src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8">
>
jQuery(document).ready(function(){
// binds form submission and fields to the validation engine
jQuery("#frmLogin").validationEngine();
});
</head>
<body>
<form id="frmLogin" name="frmLogin" method="post" action="">
<table width="548" border="0" id="txtbrder">
<tr>
<td width="90" height="">Enter User Id </td>
<td width="152"><label>
<input name="txtUid" type="text" id="txtUid" class="tnm validate[required,custom[email]] text-input" />
</label></td>
<td width="56"><div align="left">Password</div></td>
<td width="154"><label>
<input name="txtPass" type="password" id="txtPass" class=" tnm validate[required] text-input validate[required,minSize[6]] text-input" />
</label></td>
<td width="74"><label>
<input name="btnLogin" type="submit" id="btnLogin" value="LogIn" style="background:#0000FF;color:#fff;"/>
</label></td>
</tr>
</table>
<a rel='nofollow' href="php/userinfo.php">Create New Account</a>
<a rel='nofollow' href="php/forgotpassword.php"> Forgot Password ?</a>
</form>
</div>
</body>
</html>
257 views
Usually answered in minutes!
×