displaying MySQL data

A

Anonymous

Guest
Hi

Do one thing.
Fetch all the rows that you need from your table into your display page as follows

row 1
row 2
row 3
...
...
...
row n (use a loop)

in the same loop perform the following. assume you have 2 pages display.php and details.php
in display.php you will display the above and details page will show the the details related to row

use the following code in the loop
Code:
while($result = mysql_fetch_array($query_result, MYSQL_ASSOC){
 echo '<a href="display.php?id=<?=$result['row_id']?>">row <?=$result['row_id']?></a><br>
}

and in your ditails.php fetch the particular rows depending on the row id that you sent
 
Back
Top