I have a db table field which is NULL by default. If user provides some input I populate the cell, however if the user removes the data, and re-submits the form I need it to be set to NULL again.
I've tried:
if (isset($_POST['userInput'] )) {
$storeInDB = $_POST['userInpu'];
} else {
$storeInDB = NULL;
}
but it just leaves the field blank...
How do I reset it to NULL?