You can check in two ways using php and javascript. If You want client side validation then you can use javascript or if you want server side validation then you can use php.
Using javascript-
if(document.formnm.fieldnm.value=='')
{
alert('your message');
return false;
}
Using php-
if($_REQUEST['fieldnm']=='') { echo "Your Message"; }