View Single Post
Old 03-27-2003, 08:17 PM   #1 (permalink)
trevor
Code Monkey
 
Join Date: Jan 2003
Location: Canada
Posts: 91
trevor is on a distinguished road
whats wrong with this code

Hey sde and others,
ive been away for a while and a problem i was dealing with 3 weeks ago sorta got forgotten........
lol anyways sde, you gave me this code and i am getting a "parse error, unexpected T_STRING" on the "or die(error);" line, so its probably the line above, but i cant figure it out....

here is the code snippet:
PHP Code:
<?
$query 
= ("Select * from news order by ID desc limit 5");
$result mysql_query($query$db)
                        or die(
"error");

while (
$row mysql_fetch_array ($result)) {

    print(
"<br><br><p>
    <b><i>posted by</i> -=[$row[author]]=-  <u>$row[header]</u></b>
    <font size='2'><i> $row[date] @ $row[time] </i></font>
    <br>
    $row[content] </p>
    <br>
    <hr width='85%'>"
);
}
?>
thanks all,
peace,
Trevor
trevor is offline   Reply With Quote