This question or similar were 4 years ago has already been asked but in my situation did not help.
I have codeigniter project. in my employee database I have TINYINT field status. if 1 employee is active otherwise inactive.
my form is in bootstrap modal.
here is switch button code:
<div class="onoffswitch3"> <input type="checkbox" name="status" class="onoffswitch3-checkbox" id="myonoffswitch3" data-format="Y-m-d" required > <label class="onoffswitch3-label" for="myonoffswitch3"> <span class="onoffswitch3-inner"> <span class="onoffswitch3-active"><span class="onoffswitch3-switch" id="onoffswitch3-switch">Active</span></span> <span class="onoffswitch3-inactive"><span class="onoffswitch3-switch" id="onoffswitch3-switch">Inactive</span></span> </span> </label> </div>
question is how can I get value of switch either it is 1 or 0. ( on form when I am clicking switch nothing hapenning in value or ... anything. please help me to resolve it.
Second question is my employee table has field date_appointed as DATE (Y-m-d), from html datedroper giving me date in d-m-Y format and I am unable to insert in database.