How come my messages won't display?
Hey guys sorry if this is a newbie question lol but how come my messages don't display?<p>Here's the code to my messages file===
<p><?php
session_start();
require "bidcon.php";
$userfinal=$_SESSION['username'];
$id = mysql_query("SELECT id FROM searchengine") or die(mysql_error());<p>echo "<h2>Messages</h2><table><tr><td width='100'><b>From</b></td><td width='100'><b>Subject</b></td></tr>";<p>// get the messages from the table.
$get_messages = mysql_query("SELECT messages_id FROM messages WHERE to_user='$id' ORDER BY messages_id DESC") or die(mysql_error());
$get_messages2 = mysql_query("SELECT * FROM messages WHERE to_user='$id' ORDER BY messages_id DESC") or die(mysql_error());
$num_messages = mysql_num_rows($get_messages);
// display each message title, with a link to their content
echo '<ul>';
for($count = 1; $count <= $num_messages; $count++)
{
$row = mysql_fetch_array($get_messages2);
//if the message is not read, show "(new)" after the title, else, just show the title.
if($row['message_read'] == 0)
{
echo '<tr><td width="100">'.$row['from_user'].'</td><td width="100"><b><a href="read.php?messages_id=' . $row['messages_id'] . '">' . $row['message_title'] . '</a></b></td></tr>';
}else{
echo '<a href="read.php?messages_id=' . $row['messages_id'] . '">' . $row['message_title'] . '</a><br>';
}}
echo '</ul>';
echo '<form name="newmsgfrm" method="post" action="new.php">';
echo '<tr><td><input type="submit" value="Compose"></td>';
echo '</form>';<p>echo '<form name="backfrm" method="post" action="member_account.php">';
echo '<td><input type="submit" value="Account"></td></tr>';
echo '</form>';
?>
</table>
3 comments
[ 3.4 ms ] story [ 21.0 ms ] thread