Can somebody please help me from going insane here? I'm echoing out my count($error_list) and it's giving me a big fat 0 (as in ZERO).
I would assume that 0 is not greater than 0, yet that block of code runs instead of the ELSE that contains the INSERT. WHY?
Thanks for any help.
$status = "<p>Please fill out the form and click Submit once.</p>\n";
$showform = true;
$error_list = array();
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$error_list = 'First Name is required.';
$error_list = 'Last Name is required.';
if(count($error_list > 0))
$status = "<ul class=\"errormsg\">\n";
foreach($error_list as $error)
$status .= "<li>$error</li>\n";
$status .= "</ul>";
$sql = "INSERT INTO buyers SET fname='', lname='' ;
$status = "<p>Buyer has been added. Please click the buton below to close this window.</p>";
$showform = false;