Safely extracting variables in PHP
by Amit Arora
Published: August 7, 2003
User Rating: 7.7 (20 votes)

Page Page » 1 2 3 4 5

How to use

The format for passing the arguments to SafeExtract is as follows

SafeExtract( array( 'TYPE1' => array('var1'[, 'var2', 'var3', ... ]), 'TYPE2' => array('var1'[, 'var2', 'var3', ... ]), 'TYPE3' => array('var1'[, 'var2', 'var3', ... ]), 'TYPE4' => array('var1'[, 'var2', 'var3', ... ]) ) );

where TYPE can be any one of the 'any', 'get', 'post', 'cookie'
'any' would extract the variables, passed from any method, i.e. GET, POST or COOKIE
'get' would extract only those variables passed from GET
'post' would extract only those variables passed from POST
'cookie' would extract only those variables passed from COOKIE

Page Page » 1 2 3 4 5

About

Amit Arora is web developer with expertise in developing eCommerce enabled websites for the businesses.

Contact | Resume

Subscribe to newsletter




Get Firefox

Monitored by Site24x7
Uptime