0
How to send a field of form Null into database?
I have created a form and gave it input type text,radio,checkbox,email. How to make any of these value Null.??so that if user submit the form without inserting anything in one field ,it will show null in database .the language I m using is php.
1 Antwort
+ 3
Google search with keywords "php insert null into database"
First hit:
https://stackoverflow.com/questions/4620391/mysql-and-php-insert-null-rather-than-empty-string
Solution (before you compose your SQL query):
$x = !empty($x) ? $x : NULL;