Code: Select all
$announcements = mysql_query("SELECT * FROM announcements WHERE ato = $auth[userGroup] && WHERE ato = '0'") or die(mysql_error());heres the code i'm using to echo the results found...
Code: Select all
while ($announce = mysql_fetch_assoc($announcements)) {
echo "<tr>
<td width='23%' bgcolor=\"#F4F4F4\"><div align=\"center\"><em>";
if($announce['ato'] == "1") { echo "Admins"; }
if($announce['ato'] == "2") { echo "Teachers"; }
if($announce['ato'] == "3") { echo "Parents"; }
if($announce['ato'] == "4") { echo "Students"; }
if($announce['ato'] == "5") { echo "Office"; }
if($announce['ato'] == "0") { echo "Global"; }
echo "</em></div></td>
<td width=\"77%\" bgcolor=\"#F4F4FF\"><div align=\"left\"><a href='/view-announcements.php?id=".$announce['id']."' style='color:#000; text-decoration:none;'>".$announce['subject']."</a></div></td>
</tr>";
}