I have a PHP form which has both mandatory fields and non mandatory fields. In the corresponding mysql table I have defined mandatory fields are NOT NULL & non mandatory fields will accept NULL values. But I figured out that a user can enter a blank value even for NOT NULL column. What happens is if I leave a NULL column blank, mysql will display its value as NULL and if I leave NOT NULL column blank, mysql will display its value as blank (NULL is not displayed).
What I feel now is it is not necessary to define non-mandatory fields as NULL in corresponding mysql table. What is the best practice? Is it ok to keep them as it is ? (i.e still allowing them to accept NULL value) or shall I change non-mandatory fields also to not to accept NULL values.
Need your advices !!!!!