Jump to content

[SOLVED] PHP Error. Can't determine


uramagget

Recommended Posts

<?
include "news.inc.php";
?>
<html>
<head>
<title>News</title>
<basefont face="Verdana">
</head>
<body>
<?
//Generate News
$query = "SELECT id, title, timestamp FROM $table ORDER BY id ASC LIMIT 0, 5";
$result = mysql_query($query) or die ("mysql_error());
if (mysql_num_rows($result) > 0)
        {
while($row = mysql_fetch_array($result))
{
?>

<h2><? echo $row['title']; ?></h2>

<p><? echo $row['content']; ?></p>
<div align='right'>
Posted by
<? echo $row['author']; ?>
</div>

<?
}
}
else {
echo "no news";
}
mysql_close();
?>
</body>
</html>

 

Returns:

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/parahost/public_html/news.php on line 20

 

Link to comment
https://forums.phpfreaks.com/topic/54191-solved-php-error-cant-determine/
Share on other sites

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.