title: Working with a *delete comment* feature
body: <p>I'm sorry if this is a duplicate, or a low-effort question, but I do not know what the name of this is, and it will be nothing but helpful to me if I knew how to execute this correctly.</p>
  
  <p>The code is:</p>
  
  <pre><code>if(isset($_POST['RemoveComment'])){
  
  mysql_query("DELETE FROM `comments` WHERE `id`='".$commentid."' ");
  
  }
  </code></pre>
  
  <p>The way this works prior to the feature is that it echos out a table of comments which it selects from a direct profile name. The way I am trying to work this delete comment system is by giving the button in the same table (next to every comment) to the profile owner or an administrator. It would delete the comment with the ID the button was pressed on. However, the code above is only capable of deleting all the comments, and some even from other profiles.</p>
  
  <p>I do not know the name of a function like this, but I do enjoy naming it as a "Universal Function" to work on any comments, please help me with this, I am going to be using this on MULTIPLE features with my website and I lack the knowledge and names of these functions. </p>
  
  <p>Extra code: (the variables)</p>
  
  <pre><code>$poster = $get_comments['poster'];
  $comment = $get_comments['message'];
  $posted = $get_comments['posted'];
  $commentid = $get_comments['id'];
  </code></pre>