It was heartening to note that PHPlib by default takes care of most most of the Top Ten security flaws published at https://www.owasp.org
For those of you who still think that PHPlib is for PHP3 take a look at https://phplib.sourceforge.net/snapshots/ This version uses PHP 4 session and works with register_globals off
Found another interesting article PHP and the OWASP Top Ten Security Vulnerabilities Doing a search before starting to write does help – I was just about to write what would have been about 80% what David Sklar has written.