Te pongo algo bien básico para que veas el funcionamiento, analizalo, copialo y pegalo tal cual está que funciona:
Código PHP:
Ver original<?php
if(isset($_POST['nombre'])) {
if($_POST['nombre'] == "")
{
echo 'ta vacio';
}else{
echo 'tiene algo';
}
}
?><form name="form1" method="post" action="">
<label for="nombre"></label>
<input type="text" name="nombre" id="nombre">
<input type="submit" name="button" id="button" value="Enviar">
</form>