Following code is intend to write the new line from a form to the first line of a text file and put the old recore back
$newline=$name."__".$email."__".$URL;
if($submit){
$file = file($record);
$fh = fopen( $record, "w" );
fputs($fp, $newline.'\n' );
fputs($fp, implode(" ",$file));
fclose( $fh );}
However, the code just erase all record in the file and not write anything in....
So any help would be appreciate....thanks