title: replace or delete line in txt file
body: <p>comm.php</p>
  
  <pre><code>&lt;?
  $com = $req_user_info['comments'];
  $name = $username;
  
  if($_POST) {
  $postdate = date("d M y h:i A");
  $content = $_POST['commentContent'];
  $handle = fopen("$com","a");
  fwrite($handle,"&lt;b&gt;" . $name . "&lt;/b&gt;:&lt;br&gt;" . $content . "&lt;br&gt;" . $postdate . "&lt;br&gt;"); 
  fclose($handle);}
  ?&gt;
  
  &lt;html&gt;
  &lt;body&gt;
  &lt;form action = "" method = "POST"&gt;
  Post a Comment&lt;br&gt;&lt;textarea rows="10" cols="30" name="commentContent"&gt;&lt;/textarea&gt;&lt;br&gt;
  &lt;input type="submit" value="Comment"&gt;&lt;p&gt;
  Comments&lt;p&gt;
  &lt;? 
  include($com);
  ?&gt;
  &lt;/body&gt;&lt;/html&gt;
  
  /*$req_user_info['comments']; = data.txt*/
  </code></pre>
  
  <p>data.txt</p>
  
  <pre><code>Alex: sometext 20 Feb 12 11:11 AM
  Alex: sometext 20 Feb 12 11:38 AM
  </code></pre>
  
  <p>What I want to do is delete (or replace with nothing) name, content and postdate.</p>
  
  <p>Example:</p>
  
  <p>Alex: sometext 20 Feb 12 11:11 AM   Delete</p>
  
  <p>Alex: sometext 20 Feb 12 11:38 AM   Delete</p>
  
  <p>So after I click delete and refresh the page I want the line to be gone.</p>