Hi, i have a code to print news..
I want to print 6 news on each site, and have next\previous buttons.
But heres the problem: i don't have a clue how to make that..
my code to print 6 news:
Please help me
I want to print 6 news on each site, and have next\previous buttons.
But heres the problem: i don't have a clue how to make that..
my code to print 6 news:
| Code: |
| <?php
include("db.php"); $query="SELECT * FROM nyheter ORDER BY id DESC LIMIT 0,6"; $result=mysql_query($query) or die(mysql_error()); $num = mysql_num_rows($result); mysql_close(); $i=0; while ($i < $num) { $nyhet=nl2br(mysql_result($result,$i,"nyhet")); $picurl=mysql_result($result,$i,"pic"); $topic=mysql_result($result,$i,"topic"); ?> <table width="592" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="163" height="25" valign="top">Topic:</td> <td width="429" valign="top"><?php echo("$topic"); ?></td> </tr> <tr> <td height="168" valign="top"><img src="<?php echo("$picurl"); ?>" height="168" width="163"></td> <td valign="top"><?php echo("$nyhet"); ?></td> </tr> </table> <?php $i++; } ?> |
Please help me
