Display text when MySQL Column is 1 <p>So here is what I have... the issue is it is giving me errors and I cant get it to work for the life of me!</p> <pre><code>&lt;?php $link = mysql_connect($hostname, $username, $password); mysql_select_db($database); if (!$link) { die('Could not connect: ' . mysql_error()); } $result = mysql_query("SELECT * FROM messages WHERE reciever=$user"); while($row = mysql_fetch_assoc($result)) { if($row['recieved'] == '1') { echo '&lt;a class="new-message" title="New Message"&gt;New&lt;/a&gt;'; } else { echo '&amp;nbsp;'; } } ?&gt; </code></pre> <p>$user is the SESSION Username (comes from a different code page)</p> <p>What I want is for it to just show the New Message when it has not been read yet (=0) and show a space (or nothing) if the message has been read (=1).</p>