Hey gurus 🙂
I'm attempting to do something that most of you will see as very simple. I'll admit my noobishness with PHP right now. I've muddled through many thing and I'm starting to get the hang of things.
What I'm confused about is syntax. In the following code I'm attempting to do a simple (so I thought) If/Then statement to echo "Done" or "Not Done" if the value of $policy, which should correspond to an enumerated field called 'afterkick_rev' to which the values are 'Covered', 'Not Covered', is equaled to "Covered". So far the only results I get are "Not Done", even though there are 2 records each with a different value entered.
$data = mysql_query("SELECT * FROM test WHERE trainer='Kà kà §hì'")
or die(mysql_error());
$policy = array('afterkick_rev');
$result = "Covered";
//Code for summary table
while($info = mysql_fetch_array( $data ))
{
if ($policy == $result)
echo "Done";
else echo "Not Done";
}
?>
I know...I know...my code is silly and it's obvious why it doesn't work right :p I come with my hat in my hand 😃