You can apply this tutorial for your contact form on your sites. This tutorial shows you in 1 file with a normal contact information form. When you submit, this file will be sent an email immediately to the target email including in codes.
• form_to_email.php
Copy this code and save as form_to_email.php to your root folder, open this file by browse to http://localhost/form_to_email.php.
Fill in all text fields and click "Submit" button.