I have a post php form and a set of inputs:
Every input looks the same, only the names change
Simply use a ternary operator. its pretty easy try this
$default = 'Mike'; $your_name = get_option('your_name'); $condition = !empty($your_name) ? $your_name : $default;