It sounds like your server is not processing PHP correctly. There’s nothing wrong with your HTML form, assuming contact.php is indeed the action page you want – you just need to get your server/computer to handle PHP properly. Check this answer for more info.
solved Why is my contact form taking me to contact.php rather than sending an email to me? [closed]