I have a school managment software built with PHP. When I run it on my local server it works fine but when I uploaded it to a remote server it gives me an error:
Error Number: 1364
Field 'religion' doesn't have a default value
INSERT INTO `teacher` (
    `name`,
    `birthday`,
    `sex`,
    `address`,
    `phone`,
    `email`,
    `password`
) VALUES (
    'teacher1',
    '08/09/2016',
    'male',
    'Dir Upper Pakistan',
    '0944840412',
    'teacher@example.com',
    '7110eda4d09e062aa5e4a390b0a572ac0d2c0220'
);
Filename: controllers/Admin.php
Line Number: 41
Also, it works fine on a free webhosting server but on another web host it sometimes works and sometimes gives the error.