jon88654
asked on
Need help with PHP flat file login system.
I am trying to create a flat file login system, when I log in to the system via the username and password I set in my .txt flat file, I recieve an error message that reads:
"Warning: file(/LoginTest/userlist.t xt) [function.file]: failed to open stream: No such file or directory in /home2/shb8_008/bt3softwar e.com/publ ic_html/Lo ginTest/va lidate.php on line 12
Could not open file /LoginTest/userlist.txt"
The code for the validate file around line 12 is:
"require_once('config.php' );
function checkLogin($user,$pass)
{
global $file;
$users=file($file) or die("Could not open file <b>$file</b>");
foreach($users as $userInfo)
{
if ( trim(substr($userInfo,33)) ==$user && substr($userInfo,0,32)==$p ass )
return 1;
}
return 0;
}"
I am new to PHP and would appreciate any help you guys gave provide. Thanks a lot.
-Jon
"Warning: file(/LoginTest/userlist.t
Could not open file /LoginTest/userlist.txt"
The code for the validate file around line 12 is:
"require_once('config.php'
function checkLogin($user,$pass)
{
global $file;
$users=file($file) or die("Could not open file <b>$file</b>");
foreach($users as $userInfo)
{
if ( trim(substr($userInfo,33))
return 1;
}
return 0;
}"
I am new to PHP and would appreciate any help you guys gave provide. Thanks a lot.
-Jon
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.