What's wrong with my PHP-code? [SPENT DAYS ON IT]?

  • Thread starter Thread starter turierik
  • Start date Start date
T

turierik

Guest
<table align="center">
<tr><td>CÍM</td><td>ÍRTA</td><td>DÁTUM</td></tr>
<?php
mysql_connect ("****", "****","****");
mysql_select_db ("****");
$sqlÂ*=Â*mysql_query ("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 0 , 5";);
whileÂ*($rÂ*=Â*mysql_fetch_array($sql)){
print "<tr>";
print "<td>". $r['title']. "</td>";
print "<td>". $r['writtenby'] ."</td>"
print "<td>". $r['date'] . "</td>";
print "</tr>";
}
?>
</table>

So I want this to print out the data (title, author, date) of the 5 news on my site with the highest id... I spent days on it and doesn't work... I'm confused :S
It displays blank page.... I take it out: site works...
Same with echo... :S
 
Back
Top