<?php
$types_to_register = array('GET', 'POST', 'SERVER');
foreach ($types_to_register as $type)
{
$arr = @${'HTTP_' . $type . '_VARS'};
if (@count($arr) > 0)
{
// Escapa todas las variables del post, para que entren en mysql sin errores ( ' y ` )
while(list($key,$value) = each($arr))
{
$valor_seguro=mysql_escape_string($value);
if (!$let_htmlentities)
$valor_seguro=encodeText($value);
$$key=$valor_seguro;
@${'HTTP_' . $type . '_VARS'}[$key]=$valor_seguro;
@${"_".$type}[$key]=$valor_seguro;
}
}
}
?>