tags:

views:

67

answers:

2
$_REQUEST['delete_me'];

Array ( 
 [action] => test
 [city_name] => Orlando 
 [delete_me] => - 
);

Can I just delete it or will setting it to $_REQUEST['delete_me'] = ""; do the trick?

+10  A: 
unset($_REQUEST['delete_me']);

See the PHP manual for more information about unset.

halfdan
+3  A: 

In addition to what halfdan said, you should probably be using $_GET or $_POST or equivalent, unless you really do require it to be that ambiguous.

Taking values from $_REQUEST can make XSS that much easier... when you want POST values and a malicious user just appends them to a query string.

alex