php jika input kosong

$a = empty($a) ? "Default value" : $a;
Smiling Salamander