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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:53:31+00:00 2026-06-05T21:53:31+00:00

I am having problems creating a simple PHP script. The $_GET[give] variable is always

  • 0

I am having problems creating a simple PHP script. The $_GET["give"] variable is always 0 in PHP, but I did define it in the URL. If it’s not defined, my script redirects.

    if (isset($_GET["give"])&&$_GET["give"]!="") {
        echo "give GET detected<br />";
        $user = $_GET["give"];
        echo $_GET["give"]+$user+"<br />";
    }
    header("Location: /diamonds/"); //this document, but removing arguments.

The URL is fine, /?give=kroltan, it should echo kroltan. But instead, I get this in the browser:

   give GET detected <br>
   0

It doesn’t even echo the $user variable, although it’s the same value as $_GET["give"]. And no <br> after that too

  • 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-05T21:53:33+00:00Added an answer on June 5, 2026 at 9:53 pm

    This is PHP. You concat strings with a . and not a +.

    As @MarcB said in the comments – in other words, you’re doing a mathematical addition on strings, so PHP is converting your kroltan string to a 0.

    String operators in PHP

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

Sidebar

Related Questions

I'm creating a simple GUI app using Tkinter with Python, but I'm having problems
I am creating a file tree using PHP & jQuery, but I'm having trouble
I am creating a simple game database and I am having some problems. There
Hey i'm having problems creating a simple button for a programme which finds the
I'm having big problems while creating a simple program in C. I have the
Having real problems creating artifacts in teamcity 6.5 (using TFS & MSBuild as the
I have been having problems with creating a download list of files for a
We're having a significant number of problems creating a bulk upload function for our
I seem to be having some problems creating a jquery plugin. I am testing
I'm creating a custom control, and I'm having problems binding UI elements inside a

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.