I am trying to create simple next/back links to navigate through a record set $Result, which will be individual next/previous images). So far it shows all values as simple hyperlinks and the values themselves are just a comma-separated list of IDs. It works but I need only the previous and next and have only the vaguest idea how to go about it. Below is what I have so far, can someone help me flesh it out a little?
Don
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases
Code:
if (mysql_num_rows($Result) > 0) {
$NewRow = 0;
while ($row = mysql_fetch_row($Result)) {
if ($NewRow) {
$NewRow .= ","."<a href=\"index.php?TypeID=".$row[0]."\">".$row[0]."</a>";
} else {
$NewRow = "<a href=\"index.php?TypeID=".$row[0]."\">".$row[0]."</a>";
}
}
echo $NewRow;
}
Don
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases