We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

_POST & _GET variables are not in $IN...

Development and Programming

mark186282's avatar
mark186282
290 posts
15 years ago
mark186282's avatar mark186282

within my plugin (or in the PHP of a page, with PHP enabled) I can do a dump of the $IN variable… and all $_POST / $_GET variables are stripped from the response.

  1. I’ve taken .htaccess out of the picture
  2. I’ve tested the form on a plain php page (non EE) and the vars are there.
  3. I’ve tried GET and POST methods
  4. I’ve looked all over the config trying to find something that would be stripping these out… but I can’t seem to find anything…

here’s what I’m using:

global $IN;

        print_r($IN);

any ideas?

       
mark186282's avatar
mark186282
290 posts
15 years ago
mark186282's avatar mark186282

it appears that although it’s stripped out of the $IN array, it’s able to be retrieved from the class:

this works:

$my_posted_variable = $IN->GBL('my_variable', 'POST');

I’m sorry for any confusion, I hope this discovery may help someone else someday.

thank you

       
Derek Jones's avatar
Derek Jones
7,561 posts
15 years ago
Derek Jones's avatar Derek Jones

$IN is a class object, not an array. Just to close the loop, here is the Input class docs for 1.x and for 2.x.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.