PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?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
}
?>