realize you have the form done before with fields f1..f5
after submit, do following
"a" means append, "w" if you would like to
replace existing content
if ($fp=fopen("file.txt","a"))
{
fputs($fp,"$f1,$f2,$f3,$f4,$f5");
fclose($fp);
}
the directory you store the file must be world-writable for www server (eg. nobody user in the case of apache/unix)