function save($gmt, $name, $address, $phone, $remark)
{
$query= "INSERT INTO `user` (`gmt`, `name`, `address`, `phone`, `remark`) VALUES ('$gmt', '$name', '$address', '$phone', '$remark')";
mysql_query($query);
}
Here, address, phone, and remark can be NULL
. I need it to save NULL
whenever the variable is set to NULL
and the column is nullable, instead of inserting an empty string.
How can I insert NULL
value into the database using PHP?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With