PHP File Upload

FILE processing in PHP (guru99.com)

Uploading/Downloading Files To MySQL Database

NULL and NOT NULL?

If your "not null" field is a text type (TEXT, VARCHAR, ..) then it's not null, but empty. So MySQL doesn't complain, because it cannot distinguish between empty and null.

If you define an integer (or any other number type) field "not null", then MySQL would complain, if you leave it without any value. (If set a default value for your "not null" field, then MySQL wouldn't complain either.)

Inserting and displaying images in MySQL using PHP