/**************************************
function : stringIsEmpty
description : checks the field length
return value: BOOL
parameters : 1
string = STRING:the string to check
**************************************/
function stringIsEmpty($string)
{
if (strlen(trim($string)) < 1){
return(TRUE);
} else {
return(FALSE);
}//end if
}//END function stringIsEmpty
if ( stringIsEmpty($_POST['field']){
//do something here
}//end if