value = ''; or value = 'value is not empty'; js: alert(value || 'empty'); php: isset($value && print($value));