Hello all,
I am very confused about a little problem that i have.
I have few fields in a table say user_index,first_name and last name. user_index is an index (autoincrement) .
Now, I fetch data and displayed the whole data in few rows. Each row of data is being displayed in few lines and when one click on more on any full information displays. it is like a Dating site search where when you search for profiles it comes in different rows and when you click any of it you goes on full profile.
So my question is : how can i put Next and Previous button on a full profile page, like if you clicked on tabish's profile you can 2 buttons there for next and previous , next will show the next profile after tabish's and previous will show a previous profile before tabish's.
So where i am stuck is : user_index is being passed to show the profile and i can show next and previous profile after adding and removing 1 from the id (user_index) is being passed through query string, BUT the question is , WHAT IF THERE ARE SOME PROFILES WHICH HAVE BEEN DELETED, i.e. THE USER_INDEX IS NOT IN SEQUENCE, i.e. IT CAN BE LIKE 1,2,6,8,10,12 .. so how can i show next and previus if autoincement field is not in sequence??
Any help would be appreciated. I am stuck.
Regards
Tabish