Code Script

Home | Scripts | Tutorials | Disclaimer | Sitemap | Contact

   Set Global Get And Post Variables

Reference / Php / Set Global Get And Post Variables

Automatically created global variables from GET and POST parameters are not created in PHP 5 which can break a lot of code. This code creates these variables to provide a quick and dirty fix to the problem. There are good security reasons for explicitly creating global variables for each GET or POST parameter so try to use this code as a temporary fix only.

while(list($key, $value) = each($HTTP_POST_VARS)){

     ${$key} = $value;

while(list($key, $value) = each($HTTP_GET_VARS)){

     ${$key} = $value;

Please note that a disclaimer applies to any code on this page.
  Go Back
  Print Page

- Links
- Reference
     - Javascript
     - Mysql
     - Php
          - Calculate Date Yesterday
          - Database Backup
          - Ftp Upload
          - Gzip File
          - List Files In Directory
          - Previous Sql Insert Id
          - Send Email
          - Server Visitor Properties
          - Set Global Get And Post Variables
          - Sql Query Results
     - Standards
     - Windows Os
- Script Editors
- Tutorials
- Vbscript