Hi Guys,

Sorry, this problem is dead basic i bet but i can't figure it out! basically when editing blog posts, if the user has no entries to edit then "sorry no entries exhist at present" but if the y do exhist then echo them out , i did the usual if/else but it isn't working heres the code:

PHP Code:
// Get the users id...//////////////////////////////////////////////////////////////
$id $_GET['id'];
// Delete the blog post from the site...////////////////////////////////////////////
if($_GET['action']=='DelCom') {
mysql_query("DELETE FROM member_comments WHERE id='$id'");
"<p>The Blog Post Has Been Deleted Successfully <a href=\"javascript: history.go(-1)\">Go Back</a></p>";  
// Make a query to retrieve the comments.../////////////////////////////////////////        
$query2 "SELECT * FROM member_comments WHERE mid='$id'";   
$result = @mysql_query($query2) or die(mysql_error());
// No commenst on blog...///////////////////////////////////////////////////////////
if($mysql_num_rows == 0) {
"<p>Sorry, You Have No Posts To Edit Yet!</p>";
     } else {
// display the profile comments in a loop...////////////////////////////////////////
while($row mysql_fetch_array($result)) {
$post $row['comments'];
$post_id $row['id'];
"<table width=\"100%\" border=\"1\" bordercolor=\"black\" cellpadding=\"2\" cellspacing=\"0\">
           <td width=\"20%\" bgcolor=\"#E2E2E2\"><p>Blog Post: 
$post_id</td><td width=\"70%\" bgcolor=\"#E2E2E2\"><p>$post</td><td bgcolor=\"#E2E2E2\"><p><a href=\"edit_blog.php?action=DelCom&id=$post_id\" onclick=\"return confirm('Are You Sure You Want To Delete This Blog Post?');\">Delete</a>/<a href=\"edit_blog_comments.php?id=$post_id\">Edit</a></td>
           </table><br />"
thanks for the help guys