I'm having an issue. I'm inserting into a business table. I'm inserting address, name, slogan. If no slogan is provided I would like to insert NULL into the database rather than an empty string.
I figured doing this
Code: Select all
if ($_POST['slogan'] == "")
$_POST['slogan'] = NULL;
Code: Select all
$business->addBusiness($_POST['businessName'], $_POST['phone'], $_POST['address'], $_POST['city'], $loginId, $_POST['businessType'], $_POST['slogan'], $_POST['URL'], $_POST['businessDescription']);