Are you wanting the preferences to be real-time changeable?  For example, 
user preferences that can be modified then saved?  If so, just store them in 
an array, then serialize the array and save it to a file.  Read the file at 
every page load.

[code]

//save the settings
$user_settings['setting1'] = 'foo';
$user_settings['setting2'] = 'bar';

$fh = fopen('user_settings.dat');
$serialized = serialize($user_settings);
fwrite ($fh, $serialized, strlen($serialized));
fclose($fh);

//reload the settings
$user_settings = unserialize(file_get_contents('user_settings.dat'));


[/code]


Hope this helps.

-- 

Sincerely,

A.J. Brown



"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> [snip]
> I'd like to save some program preferences to a txt file where they can be
> recalled and updated at a later time. Basically this will be a variable 
> name
>
> and a value. Can someone suggest a reference or method to best perform 
> this
> task?
> [/snip]
>
> Open a new file, save stuff to it, close the file.
> Include the file where you need the prefs.
>
> http://www.php.net/fopen
> http://www.php.net/explode 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to