Checking Whether a Variable Is Set: isset( )
<? $foo = 1; if (isset($foo)) { echo "Foo is set\n"; } else { echo "Foo is not set\n"; } if (isset($bar)) { echo "Bar is set\n"; } else { echo "Bar is not set\n"; } ?>