I have a problem... I mean it looks good, but It's erroring up...?

while($row = mysql_fetch_array($result))
{
    $fav = 0;
    $stop = 0;
    $id = $row['id'];
    $title = mysql_escape_string($row['title']);
    $body = stripcslashes(nl2br(mysql_escape_string($row['body'])));
    $time = date("n.j.Y", $row['timestamp']);

    $result1 = mysql_query("SELECT * FROM favoriteposts WHERE ip='".$_SERVER['REMOTE_ADDR']."' ORDER BY blogid DESC") or die(mysql_error()."<br><br>Please send the text above to an admin who can fix the problem!");
    while($row1 = mysql_fetch_array($result1)) {
        if($stop == 1) {
            if($id == $row1['blogid']) {
                $fav = 1;
                $stop = 1;
            } else {
                $fav = 0;   
            }
        }
    }
    echo "
    <article>
        <h1><a href='?id=".$row['id']."'>".$title."</a></h1>
        <span class='date'>".$time."</span>
        <p id='articlebody'>".$body." fav = ".$fav."<br>
        <a href='?id=".$row['id']."'>View Post</a>";
        if($fav == 1) {
            echo "<a style='margin-left:20px;' href='?fav=".$row['id']."'>Unfavorite Post</a>";
        }
        if($fav == 0) {
            echo "<a style='margin-left:20px;' href='?fav=".$row['id']."'>Favorite Post</a>";
        }
        echo "</p><br>
    </article><br><br>".$fav."
    ";
}

whats the error message?

Also share the error you are facing

What mean "I mean it looks good, but It's erroring up...?" You don't even check your code that it does work or not ? Post what you're trying with that codes and what problem you're getting.

Hm.. It's weird because your sidebar works, but this doesn't.

What is the error?? Its abit vague....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.