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 8537997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:02:19+00:00 2026-06-11T11:02:19+00:00

Ok I have the above error on my page, I am using PHP 5.3

  • 0

Ok I have the above error on my page, I am using PHP 5.3 for the first time, and have used this code before but never had this notice, so I was hoping for some guidance. I have looked at some questions but when I try to apply the solution to my bit of code it doesn’t seem to work.

This code is a PHP pagination script from paper mashup and so if I can find the answer it may help anybody else who is also using this code and experiences the same problem.

the piece of code which is generating the notice is this –

$page = mysql_escape_string($_GET['page']);
if($page){
    $start = ($page - 1) * $limit; 
}else{
    $start = 0; 
    }   

From what I have read it was suggested to add isset and so changed the code to look like it does below, however i still get the same error.

$page = mysql_real_escape_string($_GET['page']);
 if(!isset($page)){
    $start = ($page - 1) * $limit; 
}else{
    $start = 0; 
    }   

Any advice would be appreciated.

Thanks

Stan

  • 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-06-11T11:02:21+00:00Added an answer on June 11, 2026 at 11:02 am

    The ‘undefined index’ error is basically telling you that you tried to get something from an array using an index for which there is no matching element.

    In this case, the problem is in the line above your isset() call. The index 'page' is not defined in your $_GET array. So you need to first check if $_GET['page'] is set:

    if (isset($_GET['page'])) {
      $page = mysql_real_escape_string($_GET['page']);
      // do more stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this mysql query using PHP and first part is working fine, but
i have an error in this code NSString *str = @above string; //load above
I am using a 404 error page found at: /error_pages/404.php I have a regular
I have no code behind and the above error keep prompting on INSERT. The
<p><span class=linky><a href=deletephone.php?id=' . $row['id'] . '>Delete Phone</a></span></p><br /> I have the above code
I have couple of forms on my php page. I am using jQuery (&
I have to post to a URL using PHP. right now it works but
I am recoding my site using CodeIgniter. This is my first time using an
I have a website under construction, using PHP MYSQL, which contains a news page
I have this function above to create url slugs from posts title, the problem

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.