[thelist] Form Security

Simon MacDonald simonmacdonald at uk2.net
Tue Jul 20 09:09:31 CDT 2010


I've followed this thread with interest. I use something like Nan suggested
earlier in this thread:

function cleanPost($value)
{
    	$value = trim($value);
	$value = strip_tags($value);
	return htmlentities($value, ENT_QUOTES, 'UTF-8');
}
( I guess I could put this all in one statement, but I'm a simple soul!)

>From reading the thread, I'm coming to the conclusion that this isn't
perhaps the best way to do it.

Like Davoud, I'd also be interested in seeing what would be considered the
minimum PHP code to do it. I've googled this in the past and not found any
consistent recommendations - I hacked together the above from my searches.

Regards

Simon
 

__________ Information from ESET Smart Security, version of virus signature
database 5294 (20100720) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 



More information about the thelist mailing list