Hi
The script is not working.
function authenticate($user,$pass) {
$result = -1;
$data = file("shadow"); /* permission every
one read */
foreach($date as $line ) {
$arr = explode(":",$line);
if($arr[0] == $user) {
/* user name matching */
if(crypt(trim($pass),$salt) == $arr[1])
{ $result = 1;
break;
}
else
{
$result = 0;
break;
}
} /* end of for */
return $result ;
}
The above programme always returs -1.
Any help would be appreciated.
regards
CVR
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php