Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

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



Messages by Day
December 31st 2002
December 30th 2002
December 29th 2002
December 28th 2002
December 27th 2002
December 26th 2002
December 25th 2002
December 24th 2002
December 23rd 2002
December 22nd 2002
December 21st 2002
December 20th 2002
December 19th 2002
December 18th 2002
December 17th 2002
December 16th 2002
December 15th 2002
December 14th 2002
December 13th 2002
December 12th 2002
December 11th 2002
December 10th 2002
December 9th 2002
December 8th 2002
December 7th 2002
December 6th 2002
December 5th 2002
December 4th 2002
December 3rd 2002
December 2nd 2002
December 1st 2002


Messages by Month
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000