I have created a page using following link 1 in codeigniter.I have displayed the abstract in one line and author in second line using echo get_abstract($row->id=1).For second record i have to change id=2 and so on. Is there any way to create next and previous button in view so that when i click on next id would automatically get incremented and display record. Similarly for previous also.Right now I am using following view.php
<?php
if($fetch_data->num_rows() > 0)
{
$row = $fetch_data->row();
echo get_Author($row->DocumentID=1);
}?>
<?php
if($fetch_data->num_rows() > 0)
{
$row = $fetch_data->row();
echo get_Abstract($row->DocumentID=1);
}?>
You can see that i am using fixed id (DocumentID) to display records of 1st row of mysql.I want to change it dynamically by clicking next, previous in view rather than manually assigning.
The model and controller are defined in above link.I will be grateful to you for your help.