Forum Moderators: coopster
####################
<B><U><?=$username?>'s Inbox</U>:</B>
<BR><BR>
<?
mysql_select_db($db, $con);
$find_my_mail="SELECT * FROM messages WHERE recipient='$username'";
$all_my_mail=mysql_query($find_my_mail);
if (!$all_my_mail) {
die('<p>error retrieving mail<br>' . 'Error: ' . mysql_error() . '</p>');
} while ($result = mysql_fetch_array($all_my_mail))
{
$id = $result['id'];
$recipient = $result['recipient'];
$sender = $result['sender'];
$subject = $result['subject'];
$body = $result['body'];
$maildate = $result['date'];
$ifread = $result['ifread'];
echo '<TABLE border="0" cellspacing="2"><colgroup><col valign="top"><col valign="top"><col valign="top"><col valign="top"><col valign="top"><col valign="top"></colgroup><TR><TD><P align="right"><font color="maroon">From: </font></TD><TD><P>' . $sender . '</TD></TR><TR><TD><P align="right"><font color="maroon">Subject: </font></TD><TD><P><B><U><A HREF="right.php?var=var15" target="right" onFocus="if(this.blur)this.blur()"><font color="gold">' . $subject . '</font></A></U></B></TD></TR><TR><TD><P align="right"><font color="maroon"><I>date: </I></font></TD><TD><P><font color="BBBBBB"><I>' . $maildate . '</I></font></TD></TR></TABLE><BR>';
unset($id);
unset($recipient);
unset($sender);
unset($subject);
unset($body);
unset($maildate);
unset($ifread);
}
?>
####################
...but what i'm not sure of, is how to pass each individual message's ID along with the click of the link, so i can display the message in its full context in the other frame of the page. Any suggestions?
the?var=var15 refers to which page i want displayed in right.php...
every var--starting with 00--is a different page of the site, and var15 is the page which would display individual messages. Appending the $id to the URL could, in theory, work... but i would have to somehow parse the URL in right.php to say "if var begins with 15, assign following digits to $id" . . . and i'm learning this PHP junk as i go along, so, i'm not sure how to go about doing that exactly. perhaps i can integrate an array to make this work out for me?
Regards,
R.