trying to make an inbox script where readpage.php is the inbox. and the subject of the message is a link to a page which contains the full message.
IM A REAL NEWBIE SO BE GENTLE 🙂
apologies for the the lack of quality of the code i really dont know what im doing and i need someone to help me big time 🙂 thanx in advance.
<?php
session_start();
include 'db.php';
$username = $_SESSION['username'];
$query = "SELECT * FROM mail WHERE touser= '$username'";
$result = mysql_query($query);
//now, assuming that each row in $results has these values --> id, fromuser, sub
?>
html here
<?php
while($row=mysql_fetch_assoc($result)){
echo "<tr>";
echo "<td><a href=\"CMail.php\">".$row['fromuser']."</a></td>";
echo "<td>".$row['sub']."</td>";
echo "</tr>";
}
$query = mysql_query("SELECT * FROM mail WHERE sub='.$row['sub'].'");
$msg = mysql_result($query,0,"message");
$_SESSION['msg']=$msg;
?>