I tried unsetting my $variable with unset($variable); and $variable = ($variable == '' ? NULL : $variable); (to set empty variables to NULL) and my var_dump is outputting NULL as intended, but my INSERT in the mysql database is showing up empty (blank). If I define $variable to foobar then it INSERTs foobar as intended. Any suggestions?
Aucun commentaire:
Enregistrer un commentaire