<?php
require_once('includes/common.php');
if($_POST['hiden']=="1") {
$uname=$_POST['uname'];
$pword=$_POST['pword'];
if($uname!="" && $pword!="") {
$qry="select * from tn_users where username='$uname' and password='$pword'";
$selectQry=SelectQry($qry);
$userid=$selectQry[0]["userid"];
if($userid!="") {
ob_start();
session_start();
$_SESSION["tnvname"] =$uname;
$_SESSION["tnvid"] =$userid;
$role=$selectQry[0]["role"];
$usertyp=$selectQry[0]["user_typ"];
header("Location:home.php");
}
}
}
?>
|