Jump to content

[solved] you have messages!


pro_se

Recommended Posts

hey guys! i have a query to see if a certain user has messages... it is not working right... here it is: [code]<?php
  $username = $_SESSION['username'];
  $new = 'new';
$sql_query2 = "SELECT * FROM messages WHERE toname='$username' and read='$new'";
$result2 = mysql_query($sql_query2);
$rows2 = mysql_num_rows($result2);
if ($rows2==0) { echo ''; } else { echo "<span style=color:#0000FF; background-color:#BED5E7><strong><a href=messagecenter.php>You have a new message!</a></strong></span><br>";} ?>[/code]
it gives me a supplied argument error? it would be cool if you'd help!
Link to comment
https://forums.phpfreaks.com/topic/18764-solved-you-have-messages/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.