Modified list.php adding error messages