Jump to content

Need help with Next and Preview function


david212

Recommended Posts

Hi all. I wrote this piece of code: 

 

$sql="SELECT * FROM klm LIMIT ".$start.",".$limit."";
$xa=mysql_query($sql);

$s=mysql_num_rows($xa);
for($i=0;$i<$s;$i++){
	$t=mysql_result($xa,$i,"mydata");


	echo($t."<br>");
}







if($_GET["page"]!=$pages){
echo("<a href=\"?page=".($_GET["page"]-1)."\">Prev</a> | ");



} 






echo("<a href=\"?page=".($_GET["page"]+1)."\">Next</a>");

 

when i execute this code, the Preview appears with link, all i need is:

 

disable preview at first (when page=0) and enable preview (when page=1,2, etc), disable Next (when there is no data to go on) For example, look at the image below, there is disabled the [1] page, i'd like to do something like this,.linksnext.gif

 

Thanx

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.