i ussually seen, for checking of existing variable value, people use to use isset() function, for checking form value or else.
isset() is always return true if the variable is exists, whether the value is exists or not. so just use variable name to check whether the value of given variable is set or not.
[code=php]
<?
if(isset($_POST[‘var1’])) print “var1 exists, but the value may not exists<br>”;
if($_POST[‘var2’]) print “var2 exists and the value of var is exists, value of var2 = ” . $_POST[‘var2’] . “<br>”;
?>
————–
<br>
<form action=”<?=$PHP_SELF?>” method=post>
var1 (check with isset()) <input type=”text” name=”var1″><br><br>
var2 (check by default) <input type=”text” name=”var2″><br><br>
<input type=”submit” value=”CHECK :.”>
</form>