This can be done in Javascript with isNAN instead of !isset. Using the example below - both forms post to my script, one without a value and one with a value. Is the below code a correct way to do this in PHP to assign a value if the post var is not present?
$mycheck = !isset($_POST['value']) ? 0 : $_POST['value'];
<?
if($_POST) :
$mycheck = !isset($_POST['value']) ? 0 : $_POST['value'];
echo $mycheck;
endif;
?>
<!-- send value-->
<form action="" method="post">
<select name="value">
<option value="0">0</option>
<option value="5">5</option>
</select>
<input type="submit" name="submit">
</form>
<!-- doesn't send value-->
<form action="" method="post">
<input name="different_var">
<input type="submit" name="submit">
</form>