Here is a detailed instruction for PHPRunner 5.0:
- proceed to the Visual Editortab, switch to HTML mode and add following code in any place where you want to show these buttons:
{$PreviousButton} {$NextButton}
2. add View page: Before display event on theEvents tab.
Here is a sample code:
global $dal;
//Previous button
$rs = $dal->TableName->Query("RecordID<".$values["RecordID"],"RecordID DESC");
if ($data = db_fetch_array($rs))
{
$str = "<input type=button class=button value=Previous onclick=\"window.location.href='TableName_view.php?editid1=".$data["RecordID"]."';\">";
$xt->assign("Previous",$str);
}
//Next Button
$rs = $dal->TableName->Query("RecordID>".$values["RecordID"],"RecordID ASC");
if ($data = db_fetch_array($rs))
{
$str = "<input type=button class=button value=Next onclick=\"window.location.href='TableName_view.php?editid1=".$data["RecordID"]."';\">";
$xt->assign("NextButton",$str);
}
where TableName is your actual table name, RecordID is your actual field name where key value is stored.