Passing Parameters and Handling PHP Errors