Welcome Guest, Not a member yet? Register   Sign In
Unable to write checkbox to mysql db
#7

I know what the problem is now, but I still can't find the answer -

This code returns 'null' whether I check the box or not, so when I run the if, I always get '0'


Code:
echo '<tr><td class="app">'.form_label('Swimmer Left:').'</td><td class="app">'.form_input('LeavingDate', $dateLeft).'</td><td class="app">'.form_checkbox('SwimmerLeft','', $row->SwimmerLeft).'</td></tr>';

So have I formatted the checkbox wrong?
The form displays the checkbox correctly and if I untick it, it set the field to '0', but if I tick the box nothing changes.
Yours Roy
Bee Creative Web Design
www.bcwd.ltd.uk
Reply


Messages In This Thread
RE: Unable to write checkbox to mysql db - by GingerNut - 12-01-2015, 02:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB