Hello, I'm sure this is simple, but I'm having the darndest time with it. I need to display the mysql rows from the db 'messages' that match only the username, which is found in the column 'recipient'.
My code:
<?
//connection
$dbu=($_SESSION['username']);
$result = mysql_query("SELECT * FROM messages WHERE recipient=$dbu");
$myrow = mysql_fetch_array($result);
printf("<font size=2 face=arial color=white><b>Title: %s<p>Message:<BR>", $myrow["title"], $myrow["message"]);
?>
So can anyone tell me what I'm doing wrong? Thank you!