I save the value of the switch, which can be true, false, or NULL in the database. In the case of null or false, the answer is 0, which is false. Is there a solution to check for a null value? I tried using isset and Empty, but none of them help. The database is MSSQL, and the data type is a bit to store the value of the switch
<input name="radioVal" type="radio" id="radioVal" value="false" <?PHP if(row['radioVal'] == false ) echo "checked='checked' "; } ?> /> <input name="radioVal" type="radio" id="radioVal" value="true" <?PHP if(row['radioVal'] == true ) echo "checked='checked' "; } ?> />
source share