|
|
 |
RE: FN-FORUM php question
date posted 8th December 2002 19:18
Ta very muchly
PHP 4.2.3 is installed on the server so I should use $_POST then for
collecting the data.
I think I had better install a copy at home and start learning some more.
Now where did I put that 'Useful links thread' message?
Will it screw up ASP on a Windows 2K server?
Thanks for the help
Cheers
Ali
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of Raymond Stone
Sent: 08 December 2002 17:27
To: [EMAIL REMOVED]
Subject: RE: FN-FORUM php question
> Am I always to be the Homer Simpson of software development?
Could be worse, better Homer than Mr Burns perhaps.
But anyway your reply was correct on probably most installations.
For the original poster.....
In versions of PHP4.2.0 and above the PHP setting register_globals
defaults to 'off' before then the default was 'on'.
This setting controls the handling of certain global arrays, the ones
contains POST and GET parameters, Session variables, Cookies, Server
variable and Env parameters.
For example the variable name being passed via the POST method would
give an array name of $_POST['name'], (however in versions of PHP less
then 4.1.0 I think that the array was called $HTTP_POST_VARS instead).
With the setting being on
The variable 'name' is also created automatically if it exists in any of
the global arrays listed.
With the setting off
The variable 'name' would not be created and you need to use the global
arrays (they are normally called either autoglobals or super globals).
The order of the arrays processing and which arrays are actually
processed can also be varied but in general it is ENV, GET, POST,
COOKIE, SESSION, SERVER I think and if 'name' exists in an array later
on in the processing it would have overwritten the previous value.
The reason for the change was simply for security. If you use the
autoglobal arrays then you know for a fact by which method the value was
passed to you and so variables which you perhaps expect to be session
variables cannot be passed via the GET method.
Here ends the worlds worst PHP tutorial part 1 .
========
Advertise with Freelancers.net +Additions+
http://www.freelancers.net/advert.php
Freelancers and Freelance Jobs:
http://www.freelancers.net
Forum FAQs:
http://freelancers.netrickery.com
To unsubscribe please email:
[EMAIL REMOVED]
If you have difficulties unsubscribing please email:
[EMAIL REMOVED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 06/12/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 06/12/2002
|
 |
|