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.


Messages In This Thread
Using Checkboxes to Update DB - by El Forum - 09-01-2010, 11:43 PM
Using Checkboxes to Update DB - by El Forum - 09-02-2010, 04:17 AM
Using Checkboxes to Update DB - by El Forum - 09-02-2010, 05:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB