Archive for August 2010

A friend of mine posted this on their Facebook. Very nice.

“The number one killer of young Americans is the automobile. However, the Secular Humanists dominating our schools refuse to acknowledge that the only safe driving is abstinence from driving. Instead, they advocate courses in “Driver Education,” in which teenagers are taught “Safe Driving,” and no attention is given to traditional values. They are even taught the use of “Seat Belts” (and some classes even give explicit demonstrations of the proper method of applying these belts!) with, at best, a passing mention that the protection provided by these belts is only partial. Clearly, this sends a mixed message to our young people: it appears to condone driving, and the more inquisitive will surely feel encouraged to experiment with driving.” [Original Source]

Categories Politics, Stupidity
Comments (1)

I had never noticed before that submitting a form with unchecked checkboxes in it results in those checkboxes not being sent to the server at all. I had always assumed that a zero ( 0 ) would be sent for unchecked since a one ( 1 ) is sent when checked. Rather than add code to specifically handle these individual checkboxes, you can just add hidden inputs above the checkboxes in the HTML with a value of zero like this:

<input type="hidden" name="box1" value="0" /> <input type="checkbox" name="box1" value="1" />

This is a much simpler solution that doesn’t require writing any additional code or sending an array of checkboxes. I chose this method since I was using an automated Settings saver in PHP so it would be a pain to modify it and it could make the code more dirty.

Thanks to iamcam for writing about this.

Categories Programming
Comments (0)