Home >Backend Development >PHP Tutorial >Some additional instructions on the use of register_globals_PHP tutorial
register_globals is a configuration in php.ini. This configuration affects how PHP receives passed parameters. If your question is: Why can't my form pass data? Why can't my program get the passed variables? Wait, then you need to read the following content carefully.
The value of register_globals can be set to: On or Off. Let’s give a piece of code to describe their differences respectively.
<form name="frmTest" id="frmTest" action="URL"> <input type="text" name="user_name" id="user_name"> <input type="password" name="user_pass" id="user_pass"> <input type="submit" value="login"> </form>
When register_globals=Off, the next program should use $_GET['user_name'] and $_GET['user_pass'] to accept the passed value when receiving. (Note: When the method attribute of