Hello, I am making a blog lock well for my blog. This is checking if the value "locked" is 1. If it is then its locked. When I test on my site it does NOTHING. Please help me fix this. =)

$g = mysql_query("SELECT * FROM blogcomment WHERE id='$start'");
while ($row = mysql_fetch_assoc($g))
{
$locked = $row['locked'];
if($row['locked']==1)
{
echo 'Sorry this blog post is locked!';
}
else {
echo "
<form action='blogcomments.php?commentid="; echo $start; echo "' method='POST'> 
    <p>Title:
      <input type='text' name='title'>
      <br>
      Body: 
      <textarea name='body' cols='50' rows='5'></textarea>
      </p>
      <input type='submit' name='post' value='Submit!'>
      </p>
  </form>";
}
}
Member Avatar for diafol

What do you mean it does nothing? Nothing is displayed, the form is displayed, the F.Y. message is displayed? More into please.

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.