Help with GLOBALS

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> ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-10-2005
Sunny
 
Posts: n/a
Default Help with GLOBALS

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

??




Reply With Quote
  #2 (permalink)  
Old 12-10-2005
Janwillem Borleffs
 
Posts: n/a
Default Re: Help with GLOBALS

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


Reply With Quote
  #3 (permalink)  
Old 12-10-2005
Sunny
 
Posts: n/a
Default Re: Help with GLOBALS

So simple. :(

Thanks

> You are submitting a GET request to the page, which you will find in the



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:08 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0