If the parents are married, either the mother or father can register the birth without the other being present.
If the parents are not married, the father must be present for his name to be registered.
A baby can have any surname the parent(s) want - it doesn't have be either the mother's or the father's.
If a woman is married there is a legal presumption that her husband is the father and no law will be broken if her husband is named as the father even if he is not. However, there is no legal obligation to put the husband's name on the birth certificate if he is not the father. The husband can provide a statutory declaration that he is not the biological father or DNA results.