Well, there's nothing wrong with it, but it will insert null values where you don't specify an actual value.
If your field is an "int" (or smallint, or any other variant), you could use this:
$query="INSERT INTO users VALUES(0$house, 0$apt, 0$dorm)";
If the checkboxes were checked, the value inserted into the database will be "01", but the leading zero is ignored for an integer field. If the checkbox is unchecked, "0" will be inserted, so the net result will be all your fields containing 0 or 1.
Don't try this for a char(1) field though. The string would be truncated, and everything would end up as zero.
One onther point, though. I would always write code to check values coming back from a form before inserting them into a database.
Hope this helps!
James