Home › Forums › Back End › Empty Form Field Validation? › Reply To: Empty Form Field Validation?
January 12, 2014 at 4:51 pm
#160191
Participant
I can connect to the database the problem happens when trying to insert.
This first error :
Fatal error: Call to undefined function connect() on line 34 which is :
$DB = connect();
If I remove it I then get :
Notice: Undefined variable: DB on line 38 Fatal error: Call to a member function prepare() on a non-object on line 38
$stmt = $DB->prepare( $SQL );
This is using your connectPDO.php file to connect to the database. I get the same errors using my connect script.
I’ve spent more time getting the damn form to validate than all the other code combined. It should be simple to display errors for empty fields regardless of what code is used.