Ver Mensaje Individual
  #20 (permalink)  
Antiguo 13/01/2013, 04:48
underwebinfo
 
Fecha de Ingreso: septiembre-2012
Ubicación: Buenos aires
Mensajes: 110
Antigüedad: 11 años, 7 meses
Puntos: 9
Respuesta: Migrar de mysql a PDO

Código PHP:
Ver original
  1. class Cm_Seguridad extends Cm_Mysql{
  2.            
  3.         # --- Proteccion total
  4.         function _Proteger(){
  5.            
  6.             foreach ($_POST as $key => $value) {
  7.                 $_POST[$key] = mysqli_real_escape_string(parent::$Conexion,$value);
  8.                 $_POST[$key] = htmlspecialchars($value);
  9.             }
  10.    
  11.             foreach ($_GET as $key => $value) {
  12.                 $_GET[$key] = mysql_real_escape_string(parent::$Conexion,$value);
  13.                 $_GET[$key] = htmlspecialchars($value);
  14.             }  
  15.            
  16.         }
  17.        
  18.     }

:/ antes de asociar los post y get a variables llamo a esta funcion xD se que no voy a mandar codigo mysql ni nada xD