Rated an average of 4 stars by 2 people

Extract Variables

Script Details:
Added on August 3, 2007 by Zhay.
Zhay accreditted the script to "http://www.phpsnippets.net/."

Description:
This snippet allows scripts on servers with register globals off to function properly.

Tags: , extract, globals, register, variables, vars

Instructions:
Include this code at the top of every page or in a header file.

Code:

<?php
# Snippet from PHP Share: http://www.phpshare.org

if (phpversion() >= '4.2.0')
{
    
extract($_POST);
    
extract($_GET);
    
extract($_SERVER);
    
extract($_ENV);
    
extract($_COOKIE);
}
?>

Review this PHP Script:

Rating:

Comments:


Login

User:
Pass:

Register

Not a member? Register today and receive the many free benefits of being a member!

Advertisements