I hate doing if statements and i ran into a if problem i need help with..
now in database i have a field named lock now its enum(0,1) 0 means unlock 1 means locked
here is the code i have i know its wrong lol i need some help.. usually i stay away from if statements but this is one of them times i can't get around it..
<?php
$sql = mysql_query("SELECT lock FROM forum_question");
while ($row = mysql_fetch_array($sql)) {
if (!$lock && $row['lock'] == '0') {
$new = true;
echo "You may Post ";
} else {
echo "Sorry this post is locked";
}
}
?>
can someone help me set this right?
Thank you
Smackie