- Creating an E-mail Contact Form


by kirupa | 11 November 2011

This is a companion discussion topic for the original entry at


hello ,i did same what you have told to create contact form but it doesn’t work…please help me.I cant understand whats problem there.


Can you provide more details such as what error you are receiving? Your question currently is very vague :smile:


hi…actually when i click on submit button in contact form…php file starts to download and stopped.It doesnt sending mails on given id.i cant understand what happens.can u tell me the reason…


It sounds like you haven’t installed PHP on your server.


ok fine i 'll try,installing php on server .

thanks very much for ur support.


Creating Email Contact Form execute successfully, but Email data not send email id.


Creating Email Contact Form and executed successfully, but Email data not send on email id.
and in your form if all fields are blank and we click on submit button then we also go on confirmation.htm page.
Please help me to solve this.


Did you check that your e-mail is Working or Not ? :sunglasses:


Rupinder - the e-mail not getting sent could be a misconfiguration on the server. Have you ever been able to use PHP to send an e-mail?

Regarding your second question - look into this page for details: More specifically, the required attribute can help.

Kirupa :smile:


Really love the simplicity of this form. I didn’t it could be done into such few lines of codes. But since this is little outdated now, here is a more latest version of contact form in php and html:


Thanks for sharing your version. This tutorial is a bit out-of-date haha :stuck_out_tongue:


I am trying to set up a contact page for my website - i found your easy contact page and set it up just the way your did - I uploaded it to the web server, I fill out the form & hit submit and the mailer.php downloads & it never sends the email nor get the auto-reply.

Thanks in advance,


Do you have PHP enabled on the server?