Jump to content

[SOLVED] Pages


cpd

Recommended Posts

Im trying to make the page numbers at the bottom of the page and make them into links aswell but i cant seem to do it.

 

if(!isset($_GET['page']) || $_GET['page'] == "") {
	$PAGE = 1;
} else {
	$PAGE = $_GET['page'];
}
if(!isset($_GET['page']) || $_GET['page'] == "") {
	$OFFSET = 0;
} else {
	$OFFSET = $_GET['page'] *3;
}
$Aircraft = mysql_query("SELECT * FROM `fleet` ORDER BY `tbl_id` ASC LIMIT 3 OFFSET ".$OFFSET);
$CountQry = mysql_query("SELECT * FROM `fleet` ORDER BY `tbl_id` ASC");
$Count = mysql_num_rows($CountQry);

 

<? for($i=1;$i<=($Count/3)+1;$i++) {if($i==$PAGE) {print "[".$i."] ";} else {print "<a href=\"index.php?content=fleet%&page=".$i."\">".$i."</a> ";} ?>

 

Can anyone see why?

Link to comment
https://forums.phpfreaks.com/topic/136833-solved-pages/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.