properly use `checked` and `selected` echo variable