import_request_variables :

import_request_variables :

import_request_variables :
====================

Using this function, we can set the GET/POST/COOKIE variable as a Global variable

bool import_request_variables ( string types [, string prefix] )

we can set the GET/POST/COOKIE variable as a Global variable. It is useful if you disabled register_globals

Using the types parameter, you can specify which request variables to import. You can use ‘G’, ‘P’ and ‘C’ characters respectively

for GET, POST and Cookie.
The prefix parameter is used as a variable name prefix, prepended before all variable’s name imported into the global scope. So if

you have a GET value named “id”, and provide a prefix “getg_”, then you’ll get a global variable named $getg_rid

For example:
========

http://www.example.com/work/second.php?id=2, In this url we can make that get variable (id) as Global

<?php
import_request_variables(”g”, “getg_”);
echo $getg_id;
?>

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.