Welcome Guest, Not a member yet? Register   Sign In
Database INSERT changes default 'no' to NULL
#4

(This post was last modified: 03-06-2016, 10:40 PM by Bhavesh.)

Hi

First of all you need to check checkbox - checked or not like below:
if (isset($_POST['guidelines_signed']) && $_POST['guidelines_signed'] == 'on')
{
//if checked than append value in insert array
$client_data['guidelines_signed'] = $this->input->post('guidelines_signed');
}
else
{
//if uncheked skip to add check box value
}
and also set null default value for "guidelines_signed" column in database table
Reply


Messages In This Thread
RE: Database INSERT changes default 'no' to NULL - by Bhavesh - 03-06-2016, 09:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB