note 40306 deleted from features.file-upload.common-pitfalls by aidan
| From: | aidan@php.net | Date: | Tue, 12 Oct 2004 07:47:50 +0000 |
| Subject: | note 40306 deleted from features.file-upload.common-pitfalls by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78380@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster __AT__ digitalanime __DOT__ nl
----
To hansm1 @ hotmail.com:
Setting magic_quotes_gpc() off in your script.. Is useless.
The data is sent BEFORE the script executes, so it's completely useless.
THIS, is usefull:
<?php
if(ini_get('magic_quotes_gpc'))
{
if(!empty($_POST))
{
foreach($_POST as $key => $val)
{
$_POST[$key] = stripslashes($val);
}
}
if(!empty($_GET))
{
foreach($_GET a $key $val)
{
$_GET[$key] = stripslashes($val);
}
}
// and so on
}
?>