it is showing missing field because this bit:
if (
$firstname&&
$lastname&&
$username&&
$password&&
$password_repeat&&
$dob_day&&
$dob_month&&
$dob_year&&
$gender)
is not giving 'true'
therefore it skips the password check code and shows the missing field error
you need to see which field is not being passed from the form OR one field is empty
but the form and code needs refining!
maxlenght should be maxlength
Constantia font is not available on all machines plus its better to use css for style