Investigating PHP
I am currently working my way through MySQL for Dynamic Websites by Larry Ullman (edition 4).
I currently (May 2013) run php 5.3.10-1 and a mysql 5.1.31 database on apache 2.2.22 server on Ubuntu 12.04 in VirtualBox.
Chapter 13: Review and Pursue
login_functions.inc.php: May 2013
The php code in the pdf below is my solution to the 7th exercise in the Pursue section of Chapter 13 PHP and MYSQL for Dynamic Web Sites (ed4) by Larry Ullman.
The script is an update of 12.2 from chapter 12, page 372 which is a file that forms part of the login process. I have added
if (filter_var($email,FILTER_VALIDATE_EMAIL)){//these lines added for ch13 Pursue item 7
$e = $email;
}else{
$errors[] = 'This is not an email address!';
}//end of additional validation lines using filter_var()
to the script to validate the input.
I have also played around with the script but commented out my adventures and investigations.