I'm trying to implement this password protected content method on a v2.1.3 build.
This code...
<?php
global $IN;
if ( ! $the_password = $IN->GBL('the_password', 'POST') ) :
?>
...returns an error
Fatal error: Call to undefined method EE_Input::GBL() in /homepages/42/d186459053/htdocs/dri/expressionengine/libraries/Functions.php(650) : eval()'d code on line 17
After some research, it looks like part of this has been deprecated.
Instead I should be using...
ee()->input->post('the_password');
However, after reading this, it looks like the
global ee() function is only available since EE 2.6.0
Upgrading EE at this time isn't an option. What could I do to to retrieve the POST variable in this instance so this method works?