Re: Increment

From: Date: Mon, 01 Jul 2002 07:10:38 +0000
Subject: Re: Increment
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104638@lists.php.net to get a copy of this message
Hi Uma, when u make a query, make it for two rows. than show the 1st one, and per psot method send the id of the next row to the next query. $last_id = $_POST["id"]; $result = select id, yourcolumns from table ... limit $last_id, 2 $secondrow = 1; while ($row=mysql_fetch_row($result)) { if ($secondrow == 0) { ##make your button with id $button = "<form>\n". "<input type=submit value="next">\n". "<input type=hidden name="id" value="<?php echo $row[0]; ?>">\n". "</form>\n"; } else { echo "data of the first row"; $secondrow--; } } Mirza mirza@php.co.ba 01.07.2002 08:52 > Hello, > Can anyone please clear my doubt... > Actually i am retrieving the entire record details from the database..I > want to display 1 row at a time..after clicking a button i want to display > the next record..after clicking the next button i want to display the 3 > record and so on..How do i go about with this... > Thanks & Regards, > Uma

« previous php.general (#104638) next »