con este codigo que agrega dreamweaver......no hay necesidad de ningun codigo mass de seguridad?
de casualidad alguien tiene algun link de las pasos que se deverian hacer para seguridad de php?
Código PHP:
Ver original<?php
//cosas de seguridad
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
switch ($theType) {
case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int": $theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double": $theValue = ($theValue != "") ?
"'" . doubleval($theValue) . "'" : "NULL"; break;
case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); }
function stripslashes_deep($value) {
return $value;
}
$_POST = array_map('stripslashes_deep', $_POST); }
//fin
?>