Skip to content

Tag: bit

correct way of saving dropdown in php

I am using 2 kinds of dropdowns. The Yes/No and one with multiple values. Either way I use this: or The value of the Yes/No I store as a bit (before as tinyint) in my mysql-db. The multiple-choice I store as int. I get the values out of my object $member and try to select the right value: This works