Right, so the "Yes" and "No" are simply labels as opposed to actual variable values.
Try
codebook phtn
so you can see what the actual values are associated with Yes and No. Then you can redo your code as:
gen confirmed=0
replace confirmed = 1 if phtn == 1
(assuming 1 = "Yes", etc.)