Welcome Guest, Not a member yet? Register   Sign In
Using Checkboxes to Update DB
#1

[eluser]Bionicjoe[/eluser]
I have a bit field column in my table called 'is_resolved' for marking the status of an issue. 0 for no/FALSE and 1 for yes/TRUE.
Users can simply check the box to resolve the issue.

I'm struggling getting the user's check (or uncheck) to enter a 1 or 0.
No problems with the DB or anything, just need a little howto.

This is partial code for submitting info to the DB.
Code:
$data = $this->data = array(
          'is_resolved' => $this->input->post('is_resolved'),
        'ticketnumber' => $this->input->post('ticketnumber', TRUE),
Right now regardless of whether the box is checked/unchecked the field gets changed to 0.
#2

[eluser]Bionicjoe[/eluser]
When posting my is_resolved field is just blank & I cannot figure out how to get anything to populate.
Code:
Array ( [is_resolved] => [ticketnumber] => INC000000000001.....
#3

[eluser]Clooner[/eluser]
Enable the profiler to see if the data gets posted!




Theme © iAndrew 2016 - Forum software by © MyBB