October 18, 2018, 08:08:34 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: PHP Paginated Pages reprompting user for credentials.  (Read 3671 times)
Posts: 1

« on: May 16, 2013, 02:56:08 PM »

First thank you for the great script.  I have used it on multiple sites.  I ran into an issue where I have made a paginated call using a MySQL db and PHP.  I have verified that it does work without the password protect script.  However when implemented and I try to go to the next or previous page it asks me for the credentials again.  After I re-enter them I am take to the correct page in the pagination.  My password protect script is basically defaulted to the orgional. 

This is my initial PHP variable declaration for the pagination
//check if the starting row variable was passed in the URL or not
if (!isset($_GET['startrow']) or !is_numeric($_GET['startrow'])) {
  //we give the value of the starting row to 0 because nothing was found in URL
  $startrow = 0;
//otherwise we take the value from the URL
} else {
  $startrow = (int)$_GET['startrow'];


and this is the url generated portion
echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow+20).'">Next</a>';
                        echo " / ";
                        $prev = $startrow - 15;
                        //only print a "Previous" link if a "Next" was clicked
                        if ($prev >= 0)
                            echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.$prev.'">Previous</a>';

So for some reason when my url is www.example.php?startrow=15
or whatever number is setup for the pagination I have to re-enter my credentials.   Any help would be greatly appreciated.

Pages: [1]
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC