Okay so i made this simple comment system that works great but i need it to delete the previous comment when a new one is posted. Not really sure how to accomplish this, but I’m trying to find a way to clear the whole html page that the comment writes to when a new one is posted…
Anyways heres the code:
[php]<?php
if($_POST){
$name = $_POST[‘name’];
$content = $_POST[‘commentContent’];
$publisher = $_POST[‘commentPublisher’];
$handle = fopen(“comments.html”,“a”);
fwrite($handle,"" . $name . “:
” . $content . “
-” . $publisher . “
”);
fclose($handle);
}
?>
Update:Date:
Posted By:
[/php]