Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
To use variables set outside a function you will either have to pass them as arguments to the function or use the global statement to get them into the function.

If global isn't used on these variables, the script wouldn't find any info at all:
global $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_COOKIE_VARS, $HTTP_SESSION_VARS;

These variables on the other hand, were introduced in PHP 4.1.0 and are called Superglobals, and to use them you don't actually need to use global:
global $_POST, $_GET, $_COOKIE, $_SESSION;
They store the same information as the variables above but only work in PHP 4.1.0 and above (and you can use them anywhere in the script, unlike the other ones).

Magic Quotes is a setting in PHP which adds slashes to quotes in strings read from the GET and POST variables. If magic quotes is turned off you will have to use the function addslashes() to any content read from the browser before inserting it into a database. Since this is a server setting, threads removes the slashes if they are turned on, and takes care of adding them on its own when necessary.

Sponsored Links
Entire Thread
Subject Posted By Posted
PHP not loading op=Links Tiny Giants 03/02/2003 7:36 AM
Re: PHP not loading op=Links Tiny Giants 03/02/2003 8:51 AM
Re: PHP not loading op=Links Dave_L_dup1 03/02/2003 9:19 AM
Re: PHP not loading op=Links Astaran 03/02/2003 12:31 PM
Re: PHP not loading op=Links Tiny Giants 03/03/2003 1:13 AM
Re: PHP not loading op=Links Dave_L_dup1 03/03/2003 2:03 AM
Re: PHP not loading op=Links JoshPet 03/03/2003 3:14 AM
Re: PHP not loading op=Links Dave_L_dup1 03/03/2003 4:31 AM
Re: PHP not loading op=Links Tiny Giants 03/03/2003 5:10 AM
Re: PHP not loading op=Links Dave_L_dup1 03/03/2003 6:12 AM
Re: PHP not loading op=Links JoshPet 03/03/2003 10:00 AM
Re: PHP not loading op=Links Tiny Giants 03/03/2003 4:45 PM
Re: PHP not loading op=Links JoshPet 03/03/2003 5:22 PM
Re: PHP not loading op=Links Dave_L_dup1 03/03/2003 6:00 PM
Re: PHP not loading op=Links Tiny Giants 03/07/2003 6:23 AM
Re: PHP not loading op=Links Gardener 03/07/2003 6:36 AM
Re: PHP not loading op=Links Dave_L_dup1 03/07/2003 6:42 AM
Re: PHP not loading op=Links Tiny Giants 03/07/2003 4:35 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 254
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)