![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello; I'm trying to create a updates pages that I can move either to the previous record or the next record within a recordset without having to return to the repeating list of records after each up date. Assuming I have done the recordset correctly, which I have and the update records command as well here is the code I'm trying to use: ?php $prev = ''; $next = ''; $result = mysql_query("SELECT id FROM affiliates WHERE id $row_rsaffiliate[id] ORDER BY id DESC"); if ($result) { $row = mysql_fetch_row($result); $prev = $row[0]; mysql_free_result($result); } $result = mysql_query("SELECT id FROM affiliates WHERE id $row_rsaffiliate[id] ORDER BY id ASC"); if ($result) { $row = mysql_fetch_row($result); $next = $row[0]; mysql_free_result($result); } ? ?php if ($prev) echo '<a href="../affiliateeditform.php?id=' . $prev . '"><b><<Prev</b></a>'; else echo '<b><<Prev</b>'; ? ?php if ($next) echo '<a href="../affiliateeditform.php?id=' . $next . '"><b>Next>></b></a>'; else echo '<b>Next>></b>'; ? This code works in another page I copied it from but in the page I paste it into so that leads me to believe I'm missing something. In the New page the Prev and Next labels show up as text and not links between the records as I want. Any thoughts anyone. Thanks RT |
![]() |
| Thread Tools | |
| Display Modes | |
| |