If the variable comes from a form, you can't use isset() because the variable will always be set when the cgi parses the form data; it will just be blank if nothing was entered.
If you want to check if there is something actually in the variable, use:
if (!empty($var)) { }
You can't use:
if ($var == ' ') {}
...because coming from a form, there might be blanks, newlines, CR, Tabs, etc. the empty() function discounts white space and is your cleanest bet. For good measure, I always run form vars through trim() before I do the comparison.
-- Rich Rijnders
-- Irvine, CA US