Jump to content


Photo

Unexpected ';' error - cant find the problem


  • Please log in to reply
3 replies to this topic

#1 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 18 August 2006 - 04:19 AM

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

<?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>";
 }
?>

and

<?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>";
 }
?>

Link shortener with advanced, detailed statistics:

http://tyny.us/

#2 Jeremysr

Jeremysr
  • Members
  • PipPipPip
  • Advanced Member
  • 199 posts
  • LocationSaskatchewan, Canada

Posted 18 August 2006 - 04:24 AM

In some of your echo lines, you have .'s at the end right before the semi-colon. Try removing them.

#3 BillyBoB

BillyBoB
  • Members
  • PipPipPip
  • Advanced Member
  • 630 posts

Posted 18 August 2006 - 04:26 AM

<?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>";
 }
?>
and
<?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>";
 }
?>


#4 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 18 August 2006 - 04:28 AM

Yeah Jeremysr, That was it, thanks!
Link shortener with advanced, detailed statistics:

http://tyny.us/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users