I am having a problem with my deleting comment form. I want to create somehow users to delete their own comments, but so far I only manage to create deleting for all comments. It doesn't matter if it's their own or not.
Here is my form:
<form action="<?php echo $editFormAction; ?>" method="POST" name="CommentForm">
<table>
<tr><td colspan="2"></td></tr><tr><td><input type="hidden" name="name" value="<?php     
    echo $_SESSION['MM_Username']; ?>" /></td></tr>  
 <tr><td colspan="2">Заглавие:</td></tr><tr><td><input type="text" name="title"  
 style="width:300px; height:20px;" /></td></tr>
 <tr><td colspan="2">Коментар</td></tr>
 <tr><td colspan="2"><textarea name="comment" style="width:450px; height:150px;"> 
   </textarea></td></tr>
  <tr><td colspan="2"><input type="submit" name="submit" value="Коментирай"                     
    style="padding:5px; color:#069"/></td></tr>
</table>
   <input type="hidden" name="MM_insert" value="CommentForm" />
   </form><br /><br  />
<?php
  $getquery=mysql_query("SELECT * FROM comments ORDER BY id DESC");
  while($rows=mysql_fetch_assoc($getquery))
   {
 $id=$rows['id'];
 $title=$rows['title'];
 $comment=$rows['comments'];
 $MM_Username=$rows['name'];
 $dellink="<a href=\"delete.php?id=" . $id . "\">ИЗТРИЙ</a>";
 echo '<b><p   style="background-color:#6CC; border-radius:10px; te"
     ;border:1px solid;">   Потребител:</b> ' . $MM_Username . ' <br /><b>    
     Тема:</b> ' . $title . '</b><br /><b>  Коментар:</b><br />  ' . $comment .
      '<br />' . $dellink .'</p><br />' ;
    }
  ?>
and this is my delete.php :
 <?php
  include 'Connections/localhost.php';
  mysql_query("DELETE FROM comments WHERE id = $_GET[id]")or die(msql_error()) ;
  header('location: komentari.php');
 ?>
 
     
     
     
    