Hopefully this is an easy question. I have a PHP webform and I need to have the form enter a NULL value into a column, if NULL is select from a drop down list. All I keep coming up with is an empty value, but not a NULL value.
For example the HTML form code is
<p align="left">Manufacturer's Name:
<select name="HOUSING_MANUF_NAME" id="HOUSING_MANUF_NAME">
<option selected>NULL</option>
<option>Enlight</option>
<option>Other</option>
</select>
and the PHP code is
if ($HOUSING_MANUF_NAME == 'NULL') {
$HOUSING_MANUF_NAME = NULL;
}
I have also tried some other PHP code such as
if ($HOUSING_MANUF_NAME == 'NULL') {
$HOUSING_MANUF_NAME = '';
}
but cannot get the form to put a NULL value into the database. I always just get an empty value i.e. ''
Any ideas on how I would do this? I would appreciate any help you can give me. Thanks.