Jump to content

Archived

This topic is now archived and is closed to further replies.

techiefreak05

Unexpected ';' error - cant find the problem

Recommended Posts

Hi, i have two codes.. and they both produce an UNEXPECTED ; ERROR

[code]<?php
$query = mysql_query("SELECT * FROM outbox WHERE `from` = '$_SESSION[username]'");
while ($array = mysql_fetch_array($query)){
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#CCFFFF><td height=50><b>To:</b> <a href=" . $array['to'] . ".html>" . $array['to'] . "</a ><br><b>Read:</b>".$array['status']. "<br><b>Date:</b>" .$array['date']. "<br><b>Subject:</b>" .$array['subject'].;
echo "</td></tr></table>";
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#FFFFCC><td height=150><b>Message:</b>" .$array['message'].;
echo "</td></tr></table><br>";
}
?>[/code]

and

[code]<?php
$query = mysql_query("SELECT * FROM messages WHERE `to` = '$_SESSION[username]'");
while ($array = mysql_fetch_array($query)){
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#CCFFFF><td height=50><b>From: <a href=" . $array['from'] . ".html>" . $array['from'] . "</a ><br>Read:".$array['status']. "<br>Date:" .$array['date'].;
echo "</b></td></tr></table>";
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#FFFFCC><td height=35><a href=\"showMessage.php?id=".$array['id']."\">Subject: ".$array['subject']."</a>";
  echo "</td></tr></table><br>";
}
?>[/code]

Share this post


Link to post
Share on other sites
In some of your echo lines, you have .'s at the end right before the semi-colon. Try removing them.

Share this post


Link to post
Share on other sites
[code]
<?php
$query = mysql_query("SELECT * FROM outbox WHERE `from` = '$_SESSION[username]'");
while ($array = mysql_fetch_array($query)){
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#CCFFFF><td height=50><b>To:</b> <a href=" . $array['to'] . ".html>" . $array['to']  "</a ><br><b>Read:</b>".$array['status']. "<br><b>Date:</b>" .$array['date']. "<br><b>Subject:</b>" .$array['subject'];
echo "</td></tr></table>";
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#FFFFCC><td height=150><b>Message:</b>" .$array['message'];
echo "</td></tr></table><br>";
}
?>
[/code]
and
[code]
<?php
$query = mysql_query("SELECT * FROM messages WHERE `to` = '$_SESSION[username]'");
while ($array = mysql_fetch_array($query)){
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#CCFFFF><td height=50><b>From: <a href=" . $array['from'] . ".html>" . $array['from'] "</a ><br>Read:".$array['status']. "<br>Date:" .$array['date'];
echo "</b></td></tr></table>";
echo "<table bgcolor=#99CCFF width=250><tr bgcolor=#FFFFCC><td height=35><a href=\"showMessage.php?id=".$array['id']."\">Subject: ".$array['subject']."</a>";
  echo "</td></tr></table><br>";
}
?>
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.