I'm working on making the messages flash a gif image when there are new messages. Right now I have 2 different colored png's, but it's not working with them, so won't with the gif. What is me doin' wrong? lol
Code: Select all
<?php
$i = 0;
$messageinfo="SELECT pid FROM messages where pid='$user[username]' AND readm = '1'";
$messageinfo2=mysql_query($messageinfo) or die("Could not get messages");
while($messageinfo3=mysql_fetch_array($messageinfo2)) {
$i = $i + 1;
}
if($i > 0) {echo "<img src = 'images/mail.png' width='30'><a href='messages.php?messages=1'></a></font></a>";
}
else{echo "<img src = 'images/mail2.png' width='30'><a href='messages.php?messages=1'></a></font></a>";
}
?>