Ok. I need to use php to access a cell in a table for the user and check to see if the value is "Yes" or "No".
If the value is "Yes", then I need php to display "New News", if the value is "No" I need php to display "No New News."
I'm a newbie at coding (I'm not exaggerating.
), and I think I probably am trying to do it totally wrong! Please help me.
(btw- I used include to include this file in another page if that makes any difference oh and 'theuser' is a cookie. It works.
$con=mysql_connect('hostname', 'username', 'password');
$NewNews = mysql_query ("SELECT News FROM Users WHERE Username = '$theuser'",$con);
echo ("New News!");
$UpdateIt = mysql_query ("UPDATE Users set News = 'No' WHERE Username = '$theuser'",$con);
print ("No New News");