The problem in the code is that you aren't escaping quotes in your echo.
PHP:
<?
include("cons.php");
$user = USER;
echo "Inbox | <a href="compose.php">Compose</a><br>";
$info = mysql_query("SELECT * FROM pm WHERE whoto='$user'");
if (READ) {
$read = mysql_query("SELECT * FROM pm WHERE whoto='$user' AND readit='no'");
$numread = mysql_num_rows($read);
echo "You have ".$numread." new messages";
}
if (mysql_num_rows($info) == 0) {
echo "<br>No messages in your inbox!";
}else{
if (SUBJECT && READ && TIME){
echo "<table><tr><td>Subject</td><td>From</td><td>Read</td><td>Time Sent</td><td>Delete?</td></tr>";
}
in this line see how you have an echo
PHP:
echo "Inbox | <a href="compose.php">Compose</a><br>";
Basically you need to make that like look like and escape the quotes inside the echo
PHP:
echo "Inbox | <a href=\"compose.php\">Compose</a><br>";
When ever you do echo "xxxxxxx" and have double quotes inside there are two well maybe three things you can do.
1. You can escape all the double quotes except the opening quote of the echo and the closing quote of the statement
2. You can change all double quotes inside the echo into single quotes
*3. You can change the double quotes on the outside to a single quote.
*Note: No PHP will be excuited inside the single quote echo.