Problem in getting current page number in this case:

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bandy
    New Member
    • Mar 2010
    • 25

    Problem in getting current page number in this case:

    Hi there,

    I am quite confusing in getting page number for pagination links.

    See what I am doing:I have a ShowDetails.php page on which I have created page links in for loop. Onclick of every links I am calling ajax function with parameter as URL(GetData.php ) and target. When this function is called I get data through GetData.php and print it with div tag(target) in ShowDetails.php . As using ajax to get data, I not getting current page number in ShowDetails.php , because links are created in for loop and getting result and printing it div tag.

    So can somebody here help me getting page no on ShowDetails.php

    Your help will be greatly appreciated. Thank you in advance.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Next/Last page numbers can be passed as URL variables within the links.
    Code:
    '<a href=showdetails.php&n='.$next.'&l='.$last</a>'

    Comment

    Working...