hi, im very new to php. im trying to just make a guestbook, and have the newest added comments show on the top of the page. soo, i need to open the file that holds all the previous users comments, read it into a variable, delete the contents of the file, then write the newly added comment to the top of the file, then write the older user comments underneath it. right? anyway this is what i have below. works fine without the join(file()) line but new info goes to the bottom of page. this below doesnt throw an error. but it doesnt add the new info at all.
$form_input = "<p>$email<br>$comments</p>";
$xx = join(file("info.php"),'');
$fp = fopen("info.php", "a");
fwrite($fp, $form_input, $xx);
fclose($fp);