You should do indenting manually... your editor should automatically indent to where you were on the previous line when you press enter, if not look at the settings. Whenever you open braces, the line after it should be indented further, and when you close that set of braces off go back to the left one so they line up. It makes it much easier to read it without going into detail!
Isset() checks if the variable is SET. So this means if <input type="text" name="TD" /> (for example) is in your form, regardless of whether or not you enter any data into it), it will be set. I would suggest one of the following intead:
PHP Code:
// replace $var with what you are checkin
if (!$var)
{
// checks if $var is false (this will work with an empty string)
}
if ($var == '' OR $var === '')
{
/*
Checks if $var is is an empty string. Second method is probably preferred
because it checks type as well.
*/
}
if (empty($var))
{
/*
Checks if $var is empty:
A variable is empty if it is any of the following:
"" (empty string)
0 (integer)
"0" (string)
NULL (or not set yet)
FALSE
array() (empty array)
It also checks if the variable isset.
*/
}