This is a discussion on Help with GLOBALS within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi in a page i have <a href="somefunction.php?arg=argumentone">sometext</a> ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Sunny wrote:
> Hi > > in a page i have <a > href="somefunction.php?arg=argumentone">sometext</a> > > why in somefunction.php , arg is empty ? > > $GLOBALS['arg'] = nothing > $arg = nothing > You are submitting a GET request to the page, which you will find in the $GLOBALS array as $GLOBALS['_GET']['arg'] and $GLOBALS['_REQUEST'['arg']. The keys '_GET' and '_REQUEST' represent super globals, which implies that you don't need to reference the $GLOBALS array, but simply reference either $_GET['arg'] or $_REQUEST['arg'] to get the argument's value. JW |