if(empty($_post['imagen']))//puede ser $_get['imagen'] depende del método q uses { $variable="sin imagen" ; }else { $variable=$_post['imagen']; }