Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Login page interfacing with flat file

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Postby Redcircle » Mon Mar 03, 2003 12:35 am

My suggestion would be to put the information into the file a little different. 1 user for each line and seperate the information using a : or ; as a delimiter


using this method will allow you to use the file() function.

This will read each line and put it into an array.

Code: Select all
$users = file('login.txt');

you can then use the explode function to extract the information from each line.
Code: Select all
$size = sizeof($users);
for($x=0; $x<$size; $x++)
$users[$x] = trim(explode(':',$users[$x]),':');
User avatar
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot], landi and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.