Out of curiosity, why not use an INI file, and make maters eaier? If you are geared toward a hard file for saving the data, but wtill want the reverance ability, just use an INI file.
Quick and easy as $readini(users.ini, Users, $nick)
If the result is $null, they are not registered, else they are and the value holds the password.
-KingTomato
http://www.kingtomato.com/AIM: otamoTgniK