Hi;
how can i show the delete and edit link to the user who has posted the comment just like in facebook only the person who has posted the comment is allowed to edit or delete the comment below is my code
<?php
//including the database connection file
include_once("includes/settings.php");
connect();
//fetching data in descending order (lastest entry first)
$result=mysql_query("SELECT * FROM comments ORDER BY id DESC");
echo "<table width='80%' border=0>";
echo "<tr bgcolor='#CCCCCC'>";
echo "<td>Name</td>";
echo "<td>Comments</td>";;
echo "</tr>";
while($res=mysql_fetch_array($result)){
echo "<tr>";
echo "<td>".$res['Name']."</td>";
echo "<td>".$res['Comments']."</td>";
echo "<td><a href=\"edit_comment.php?id=$res[id]\">Edit</a> | <a href=\"includes/delete.php?id=$res[id]\">Delete</a></td>";
}
echo "</table>";
?>