I have this stupid problem and i can't figure out what's wrong. When i'm trying to delete any of the categories i get the message 'The specific category cannot be deleted.' even if the category's $s value is N. When i change the condition to if ($s == 'Y') it deletes everything, even those with $s value = Y.
$check = @mysql_query ("SELECT standard FROM category WHERE id='$id'");
$row = mysql_fetch_array ($check);
$s = $row['standard'];
if ($s = 'Y') {
echo '<p>The specific category cannot be deleted.</p>';
include ('includes/footer.inc.php');
exit();
} else {
$delete = @mysql_query ("DELETE FROM category WHERE id='$id'");
echo '<p>Category deleted succesfully.</p>';
include ('includes/footer.inc.php');
exit();
}
What's wrong with this condition?