www.pudn.com > smartstarwap.rar > function.inc.php, change:2005-10-04,size:607b


<? 
include("../db_connect.php"); 
// start session  
session_start(); 
// convert username, password and checkcode from _POST or _SESSION  
 $_SESSION['username']=$username; 
 $_SESSION['password']=$password; 
 
// query for a user/pass match  
$result=mysql_query("select * from users   
  where username='" . $_SESSION['username'] . "' and password='" . $_SESSION['password'] . "'") or die("query failed!"); 
 
// retrieve number of rows resulted  
$num=mysql_num_rows($result);   
 
mysql_close($db); 
 
if($num < 1){  
  echo "You are not authenticated.  Please login.<br><br> ";  
    
  exit;  
} 
?>