It would be best to read the manual pages on superglobals and retrieving external variables as the manual explains these topics in detail:
http://www.php.net/reserved.variables http://www.php.net/variables.external Regards, Philip On Sun, 29 Jun 2003, esctoday.com | Wouter van Vliet wrote: > Let's explain this thing with the superglobals now once again .. so that > everybody knows it ... > > In newer versions of PHP some superglobal arrays are available... > > $_GET[] - For any variable passed through the query string (in the URL, > or address bar in a http://www.domain.com/page.php?foo=bar&foo2=bar2 syntax) > but also fields submitted through a form with a tag like <FORM method="GET"> > $_POST[] - For any field submitted from a form with tag like <FORM > method="POST"> > $_COOKIE[] - For any cookie set and available for the script you're > running. > --------------- > $_REQUEST[] - Merges the above three together. I think I mentioned them in > the default order of importance. Post overriding cookie, get overriding > post. > > $_FILES[] - Also for information send by a form, but now only the <INPUT > type="FILE" name="fieldname"> entries are listed. Remember to use this kind > of form tag: <form enctype="multipart/form-data" action="_URL_" > method="post"> .. espeically "method=post" and "enctype=multipart/form-data" > are essential. Prior to PHP4.3 the $_FILES superglobal was also included in > $_REQUEST, but don't rely on that to happen since it will make your scripts > fail in a newer version and have you look for a bug which is almost > impossible to find. > > $_SESSION[] - Session vars set. When using $_SESSION, you should not use > session_start() of functions like that. A session usually exists untill a > user closes his/her browser window. Or 30 minutes has expired, whatever > comes first. (The 30 minutes is a setting in php.ini and can be overriden, > if i'm right about that) > > $_ENV[] - info about the user's default shell, homedir and stuff like > that. The user as which your PHP script is running on the server, that is. > NOT the user visiting your page. > > $_SERVER[] - info about the server and the script which is running.. For > example $_SERVER['php_self'] gives you the filename of the script, > $_SERVER['PHP_AUTH_USER'] for the apache basic authentication username.. > > ----- > > So, now I hope this has been cleared out for everybody.. And that I'll still > be in time to see my fav bands play at ParkPop, one of the biggest free open > air pop festivals I think in Europe.. just around the corner of my house > here in The Hague. > > Salutes, > Wouter > > -----Oorspronkelijk bericht----- > Van: Jason Wong [mailto:[EMAIL PROTECTED] > Verzonden: vrijdag 27 juni 2003 22:46 > Aan: [EMAIL PROTECTED] > Onderwerp: Re: [PHP] $_POST problem > > > On Saturday 28 June 2003 04:32, Sparky Kopetzky wrote: > > > I've got my script kinda running but am unable to retrieve any values with > > $_POST. I turned on register_globals in the php.ini and am using this url: > > If you're going to be using $_POST (which you should) then you should > *disable* register_globals. > > > http://www.fttta.com/auction.php?action=reg. (Sorry, it's local for > now...) > > > > I'm using this kind of line to check for values: > > elseif ('reg' == $_POST['action']) > > { > > do something; > > } > > Does print_r($_POST) show your variables? > > If not are you using the POST method in your form? > > If so what version of PHP are you using? > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > ------------------------------------------ > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > ------------------------------------------ > /* > Even the best of friends cannot attend each other's funeral. > -- Kehlog Albran, "The Profit" > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php