On the checkbox questions:
Yes, you're right you can use any value you want. However, I find it much easier to use a boolean expression than to go a string comparison. 1 is intrepreted as boolean TRUE and 0 is intrepreted as boolean FALSE. If you use other numbers, or other strings, you have to test specifically for that number or string. It's up to you, I just find it easier since you can write code like if($var){} instead of if($var=="blah"){} when you use straight boolean. You're choice. The way I would do it is just print the text you want if TRUE:
if($var){ print "yes";}
else{ print "no";}
-
- if($var){ print "yes";}
-
- else{ print "no";}
-
-
On radio buttons:
Radio buttons a bit special. If, by default, none are selected, then obviously the value is empty. But once one is selected, you cannot unselect it (only toggle between different options of the same name), and therefore a value will ALWAYS be returned (unless the VALUE attribute of one is blank of course...).
If you only have one radio option, if a user selects that option by accident, they can't unselect it without refreshing the page, which is obvioulsy not a good thing. Radio buttons are designed for the "Select only one of the following" type scenerios. Checkboxes are "Select all that apply" sort of things. If you only have one option, radio buttons are not appropriate (unless you use onclick javascript methods to unselect the radio button... but I think that's pretty silly personally, checkboxes are much easier).
On the default value question:
I don't recall off hand what they exact SQL syntax is to set it is, but in theory you're correct. You can set a default value, so that when a new record is created in the database, it will have that value, unless another value is assigned to it by the INSERT (in other words, you don't have to bother including that value unless it's something other than the default value). I usually use 0 (FALSE) as my defaults, but in some cases 1 would be appropriate. If you're using something other than the boolean method, I would suggest not assigning a default value and letting the field be NULL by default. Then, you can check for NULL or NOT NULL in the SQL to return items with a value... then check for the value you need (SELECT field WHERE box1=1; seems easier to me, but it's your application =])
Hope that helps!
.c