help!!--string error i have no idea what is wrong
Posted: Thu Nov 09, 2006 8:32 pm
i am using this code for a site i am designing. i need it for the news on the home page.
and it comes up with this error:

please help
Code: Select all
<?php
$database='ffleag00_thg';
include('connect.php');
$sql='SELECT*FROM newspost ORDER BY id LIMIT 5';
$result=mysql_query('$sql);
while ($row=mysql_fetch_assoc($result)) {
print '<h2>'.$row['title'].'</h2><p>'.$row['body'].'<br><i>by '.$row['user'].'</i></p>'; // line 12
}
?>
please help