Posted: Thu Mar 10, 2005 6:21 am
Untested.... (Assuming you know what the post id is which is viewed now, and what it is in the DB....
Code: Select all
$uid = $_SESSION['userID'];
$query = "SELECT userID from users WHERE postID='$thisPost' LIMIT 1";
if ($result = mysql_query($query)) {
if (mysql_result($result, 0, 'userID') == $uid) {
echo '<a href="reportedit.php" class="under">EDIT</a>';
} else {
NULL;
}
}