Jump to content

$_GET Not Working


savagenoob

Recommended Posts

I run into this every now and again and wonder if someone knows what I could be doing wrong. Using a simple $ClientID = $_GET['ID']; is not working on a certain page, I can see the ID=193 value in the address field but $ClientID remains an empty variable. I even try $_REQUEST instead, still nothing. I'm puzzled.

Link to comment
Share on other sites

Have you tried doing print_r($_GET); to see if there is anything in the array?

What's different with this page and other pages?

 

It displays Array ( [iD] => 193 )

So its in there? Im still puzzled. It wont pass into a variable using $ClientID = $_GET['ID'];

When I echo $ClientID it is empty.

Link to comment
Share on other sites

Show some code.

Are you echo'ing the variable, or using die. Because it won't show if you use die, you have to do something like:

 

die("ID: " . $ClientID);

Ehhhh.... I was putting the PHP code in a file called client.php and including it using require_once('includes/client.php');, when I just transferred all the code to the originating page it works. Blah. Dont know why, but whatever. Thanks guys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.