Jump to content

Flat file databases


Jam87

Recommended Posts

Hi,

 

I've recently been trying to build a user specific phone book using flat file databases. Basically I want php to create a flat file that is unique, and only accessible by that particular user. So when the file is created for example, each database reflects the particular users name, danny.txt for instance. So danny logs onto the site, and browses to the phonebook page, where php loads only his particular flat file database and lets him edit it accordingly.

 

Any help would be much appreciated, I've looked through various tutorials but none seem to indicate how to create user specific databases.

 

 

Link to comment
https://forums.phpfreaks.com/topic/43513-flat-file-databases/
Share on other sites

$filename=$user . ".txt";

 

fopen($filename) will create a file if it doesn't exist...

 

if you read up on this stuff  http://us3.php.net/fopen

 

you can get a lot more info on how to do this, for example what different methods you can use, and what happens with each different method.

Link to comment
https://forums.phpfreaks.com/topic/43513-flat-file-databases/#findComment-211331
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.