Hi, real newbie here, i have received some previous help and so far the code stands at:
<?php
include 'db.php';
$username = $_SESSION['username'];
$result = mysql_query("SELECT * FROM mail WHERE touser='$username'");
$idquery = mysql_query("SELECT id FROM mail WHERE touser='$username'");
$id = mysql_result($idquery,0,"id");
$fromuser = "fromuser Where id='$id'";
$sub = "sub Where id='$id'";
if ($result)
{
echo "<font face='Tahoma'>Here are the results:<br><font face='Tahoma'><br>";
echo "<table width=90% align=center border=1 bordercolor=#111111 style=border-collapse: collapse><tr>
<font face='Tahoma'>
<td align=center bgcolor=#FFFFFF><font face='Tahoma'>From</td>
<td align=center bgcolor=#FFFFFF><font face='Tahoma'>Subject</td>
</tr></font>";
while ($r = mysql_fetch_array($result))
{
$from = $r["from"];
$sub = $r["sub"];
echo "<tr>
<td align=center>$from</td>
<td align=center>$sub</td>";
} // end while
echo "</table>";
}
else
{
echo "<font face='Tahoma'>Error, Contact Webmaster at SheetShare.";
}
?>
I cant see the problem there. Thanx