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

  • Home
  • SEARCH
  • 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 355149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:59:27+00:00 2026-05-12T11:59:27+00:00

I know the title isn’t very clear. I’m new to PHP, so there might

  • 0

I know the title isn’t very clear. I’m new to PHP, so there might be name for this kind of thing, I’ll try to explain as best as I can. Sometimes in a URL, when using PHP, there will be a question mark, followed by data. I’m sorry, I know this is very noobish, but I’m not sure what it’s called to look for a tutorial or anything. Here is what I mean:

http://www.website.com/error_messages.php?error_id=0

How do you configure it to display different text depending on what the number is (in this example it’s a number)

Could somebody please tell me what this is called and how I could do this? I’ve been working with PHP for a couple days and I’m lost. Thank you so very much for understanding that I am very new at this.

  • 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-12T11:59:28+00:00Added an answer on May 12, 2026 at 11:59 am

    That “data” is the URL querystring, and it encodes the GET variables of that HTTP request.

    Here’s more info on query strings: http://en.wikipedia.org/wiki/Query_string

    In PHP you access these with the $_GET “super-global” variable:

    // http://www.website.com/error%5Fmessages.php?error%5Fid=0
    // %5F is a urlencoded '_' character, which your webserver will most likely
    // decode before it gets to PHP.
    // So ?error%5Fid=0 reaches PHP as the 'error_id' GET variable
    $error_id = $_GET['error_id'];
    echo $error_id; // this will be 0
    

    The querystring can encode multiple GET variables by separating them with the & character. For example:

    ?error_id=0&error_message=Something%20bad%20happened

    • error_id => "0"
    • error_message => "Something bad happened"

    In that example you can also see that spaces are encoded as %20.

    Here’s more info on “percent encoding”: http://en.wikipedia.org/wiki/Percent-encoding

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

Sidebar

Related Questions

The title is kind of obscure. What I want to know is if this
I know the question title isn't the best. Let me explain. I do a
I know at first glance (due to the title) this looks like one of
Update: this question, including the title, was rephrased, see history for details I know
I know the title isn't amazingly descriptive, sorry. Basically I'm in the midst of
I know my title isn't exactly worded well, so let me clarify. I'm using
::GetSystemMetrics (SM_CYBORDER) ...comes back with 1 and I know the title bar is taller
I'd like to know how to grab the Window title of the current active
Feel free to edit the title if you know how to formulate the question
As in a title, does anyone know how to freeze GridView header in ASP.NET

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.