i have a question about what i beleive to be called archiving...

i am building a news script and would like to limit post to be displayed per 
page i have done this successfully. what i am having probplems with is 
displaying the next set of news.

here is my code:
<?php 
include("core.php"); 
session_start();
$gi = mysql_query("select * from news ORDER by id asc");
while ($d = mysql_fetch_array($gi)) {
$id = $d[id];
$title = $d[title];
$news = $d[news];
$poster = $d[poster];
$pdate = $d[date];
$ptime = $d[time];
?>
<b>
<u><i><?php echo("$title"); ?></u></i><br><br>
<p>

<?php $i = $i + 1; echo("$news"); ?><br><br>
Posted By: <?php echo("$poster"); ?>, On <?php echo("$pdate"); ?> @ <?php 
echo("$ptime"); ?> <br> <?php if ($nerd == bignerds) {
echo("<a href=\"admin.php\">Edit Post</a> "); 
echo("&nbsp; <a href=\"admin.php?view=delete_news&id=$id&delete=true\">Delete 
Post</a><br><br>");
}
if ($i >= 1) {
break;
  }
?>
</b>
<?php
}
?>

this gets it to stop after one post.  i was thinking about setting a variable 
on the last post displayed, but to me this doesn't seem like the most logical 
way. if someone could point me in the right direction, or send me to a tutorial 
on the subject i would greatly appreaciate it...

thank you  in advance

Reply via email to