deleting previous entry of server
<p>i have made a server using php. The server is getting new information after some time. I want the server page to display only the current information. when a new information is received, it should delete the previous one and show only the recent. Can you help me in this.
my current code is:</p>

<pre><code>        &lt;?php 
   $fp=fopen("random.txt","a");
   fwrite($fp,$_POST['data']."\n");
   echo $_POST['data'];
   fclose($fp);
        ?&gt;
</code></pre>
