Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4081168
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:01:32+00:00 2026-05-20T18:01:32+00:00

hello everyone plz help me out with this script. I am calling my pages

  • 0

hello everyone plz help me out with this script.
I am calling my pages in this way in main page

if(isset($_GET['page'])=='view_user' && $_GET['page']=='view_user')include("user/crud_user.php"); 

i have user class in which i am doing pagination

$self   =   $_SERVER['PHP_SELF'];
        if($this->openPage<=0) {
            $next   =   2;
        }

        else {
            $next   =   $this->openPage+1;
        }
        $prev   =   $this->openPage-1;
        $last   =   $this->pages;

        if($this->openPage > 1) {
            echo "<a href=$self?page=1>First</a>&nbsp&nbsp;";
            echo "<a href=$self?page=$prev>Prev</a>&nbsp&nbsp;";
        }

The url of the page which is using this class is lie this

admin.php?page=view_user

Now i can get pagination no according to the records but when i click on no it rather take me to admin.php?page=3 because of self . I want to stick to that page for showing the result . I tried in this way also $self="admin.php?page=view_user";but no luck . please help me out

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:01:33+00:00Added an answer on May 20, 2026 at 6:01 pm

    To use one variable for serving two different purposes is quite unusual idea.
    Let me suggest you to use 2 different variables, one to designate included page and another to point to the actual page in pagination.
    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone please help me out regarding this this piece of code $user =
Hello everyone please help me out regarding this query which is fetching the data
Hello everyone I am trying to resize an image of 700kb with imagecreatefromjpeg. This
Hello everyone Masters Of Web Delevopment :) I have a piece of PHP script
Hello everyone i currently have this: import feedparser d = feedparser.parse('http://store.steampowered.com/feeds/news.xml') for i in
hello everyone im trying to create this tweak that copies a file from one
hello everyone I have 3 files: engine script #! /bin/tcsh -f cat $1 |./hello
Hello everyone this is my first post on stack overflow.com I am trying to
Hello everyone i am designing a web page that contains many textboxes and a
Hello everyone i need some help. I'm trying to make an application for mac

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.