<?php
$connection = mysql_connect('localhost', 'root', 'password') or die ("<p class='error'>Sorry, we were unable to connect to the database server.</p>");
$database = "database";
mysql_select_db($database, $connection) or die ("<p class='error'>Sorry, we were unable to connect to the database.</p>");
?><html>
<form method="post">
<input type='checkbox' value="1" name='privacy' />Private?
<input type="submit" name="save" class="form" value="Submit" />
</form>
</html>
<?php
$private = isset($_POST['privacy']) ? 1 : 0;
$query="INSERT INTO `table` (`private`) VALUES ('".$private."');";
mysql_query($query);
?>