<?php
$dbfile = fopen("/path/to/the/file/textfile.txt", "a");
fputs($dbfile, "$ref|");
fputs($dbfile, "$pass|");
fputs($dbfile, "$status|");
fputs($dbfile, "$fname|");
fputs($dbfile, "$lname|");
fputs($dbfile, "$address|");
fputs($dbfile, "\n");
fclose($dbfile);
?>