Contents of DAT file are not in binary format

Hi, Iam trying to put username and password in some dat file(ADMIN.DAT)from changeLogin page and getting/retreiving username and password from another page from ADMIN.DAT file....
My problem is username and password details are getting stored in dat file in readable text format NOT IN BINARY..