[thelist] Keeping PHP forms secure

Nan Harbison nan at nanharbison.com
Fri Aug 3 14:44:38 CDT 2007


Hi Evolters,
 
I have created several forms for a website, and I am using this code when I
process the forms to prevent attacks:   
 
while(list($key, $value) = each($_POST))
  {
   $value = trim($value);
   $value = mysql_real_escape_string($value);
  }
 
Is this enough to keep the database safe from attack? It seems like there
should more to this but I have googled and didn't find anything.
 
TIA
 
Nan
 
 



More information about the thelist mailing list