Jump to content

hey can u help me with an error in script??


runnerjp

Recommended Posts

Parse error: syntax error, unexpected T_ECHO in /home/runnerse/public_html/chatbox/maq.php on line 20

[code]<?php
#################################
include("chatbox/connect.php");
#################################

mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
// Select the database.
mysql_select_db($dbname) or die(mysql_error());
$query = "SELECT poster, message FROM ch_messages order by id DESC LIMIT 5";
$result = mysql_query($query);
$marquee = "";
$i = 0;
while($r=mysql_fetch_array($result))
{
  $posts[$i] = $r[poster].' - '. $r[message]. '';
  ++$i;
}
$marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts)

echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>"

?>code][/code]
Missing terminating semi-colon on this line:
[code]<?php $marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts) ?>[/code]

With this type of error, always look in the preceding lines, as well as the line indicated for the syntax error.

Ken
ok i did all that u said

[code]<?php
#################################
include("chatbox/connect.php");
#################################

mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
// Select the database.
mysql_select_db($dbname) or die(mysql_error());
$query = "SELECT poster, message FROM ch_messages order by id DESC LIMIT 5";
$result = mysql_query($query);
$marquee = "";
$i = 0;
while($r=mysql_fetch_array($result))
{
  $posts[$i] = $r[poster].' - '. $r[message]. '';
  ++$i;
}
$marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts) ?

echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>";

?>
[/code]

yet still an error on lien 20 :S
Hi runnerjp,

Try this:

[code]
<?php
#################################
include("chatbox/connect.php");
#################################

mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
// Select the database.
mysql_select_db($dbname) or die(mysql_error());
$query = "SELECT poster, message FROM ch_messages order by id DESC LIMIT 5";
// Otherwise, replace the above line with the following line;
// $query = ("SELECT poster, message FROM ch_messages order by id DESC LIMIT 5");
$result = mysql_query($query);
$marquee = "";
$i = 0;
while($r=mysql_fetch_array($result))
{
   $posts[$i] = $r[poster].' - '. $r[message]. '';
   ++$i;
}
$marquee = implode("<img src='http://www.runnerselite.com/image/runner.gif'>", $posts);

echo "<marquee><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>";

?>

[/code]

Regards,
Iceman

Archived

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

×
×
  • Create New...

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.