Checkbox onclick reload page?

I’m a total n00b to JavaScript (haven’t written a single snippet of it yet :(). I was wondering how hard it would be to have a checkbox cause the page to be reloaded if it was checked or unchecked.

<input type="checkbox" />

Is JS the best way to do this?

Forgot to mention I also want to include the new value for the checkbox in a POST or GET so it will be updated in my database (PHP stuffs will handle that).

<input type=“checkbox” onclick=“if(this.checked){this.form.submit();}”/> ?

Thanks mano… will that also work on an “uncheck”? Past bedtime, will try it out tomorrow.

Just remove the if…
<input type=“checkbox” onclick=“this.form.submit()”/>