Php import_request_variable stopped working

php

Solution

I had this problem from before, the work around that i did to fix it i replaced code before with code after that I've written below, so don't use import_request_variables it is deprecated in PHP 5.3 and in PHP 5.4 is removed as it is described in here https://www.php.net/import_request_variables, the following is the fix for the problem that i had:

Code Before:

import_request_variables('p');

Code After (Replaced the code above with the code below):

extract($_GET, EXTR_PREFIX_ALL, 'p');
extract($_POST, EXTR_PREFIX_ALL, 'p');

Problem

Hey everyone I was getting the following error on my web page: ``` Fatal error: Call to undefined function import_request_variables() in /demo/conn.php on line 5 ``` That line is : ``` import_request_variables('gp'); ``` I removed that line and received the following error: ``` Fatal error: Call to undefined function session_register() in /demo/verify.php on line 4 ``` That line is: ``` session_register("userName"); ``` I removed that line and everything appears to be working fine now. Can anyone tell me what was happening with those 2 lines and if I should replace them with anything or should I just continue on without them. Any guidance would be greatly appreciated. Thanks

Original source