Web Development

How to create a feedback form and receive an email

You may often come across some form links which redirect you to a page. The page contains big boxes with some questions and here you are asked to fill in the boxes with the answers to their respective questions. These types of forms are often asked to fill by students to collect their data. Else, these forms are made for websites to collect feedback about the website. Such forms have many such advantages and may look tough to build but it is yet another easy task if you decide to do it with interest. 

Read more..

How to create a feedback form and receive an email project Looking to build projects on Web Development?:

Web Development Kit will be shipped to you and you can learn and build using tutorials. You can start for free today!

1. Web Development with PHP and MySQL

2. Front End Web Development with React JS

3. Back End Web Development with Node JS

4. Full Stack Developer

5. Web Development (Career Building Course)


This blog will guide you through the process of creating a feedback form. The form will have three fields such as name, email address, and message. So, let us look into it. 

Knowledge required: PHP 

Tools required: Text editor


Latest projects on Web Development

Want to develop practical skills on Web Development? Checkout our latest projects and start learning for free


  1. First of all, make a new folder with two files named index.php and contact.php. You will make the whole form in index.php and also style and edit the form with CSS. You will use the contact.php for the main logic and receiving the email.
  2. Design a simple feedback form in Index.php. Create three input fields named “name”, “email”, and “message”. Also, create a button named “send”. The user will answer these questions in these fields.
  3. Style and edit the form using CSS. All the fields are required therefore put a ‘*’ before all the fields indicating the fact. You will have to create a logic such that if any required field is not filled by the user then the screen displays an error. Likely, if all the three fields are left empty then there are three errors. 
  4. Remember to link your contact.php file in your index.php file where you will make the outline code and also the method should be “post”.
  5. To generate errors, create an array. This array will be used to loop through later. Make an if statement to see if the fields name, email, and messages are set. Also, make an else type a message “something went wrong”. Create another array which will hold the entered data.
  6. You will have to loop through the array and see which fields are empty and therefore notify the user on the screen displaying the error. Give the print statement in the index.php file. Keep the errors in a list. 
  7. Next, work on receiving an email with all the feedback details to your email account. For this, you can use the PHP mailer library available on the internet. Install the required documents and then include the files in contact.php.
  8. To receive an email finally use the PHP mailer autoload now. Check if the array of errors is empty. This means the data was entered and therefore you can extract it and mail it to yourself.
  9. Instantiate PHP mailer then use SMTP authentication. Set the server to smtp.gmail.com. Set the username to your Gmail account and then set the password to the password of your Gmail account. Set the port to 465.
  10. Last but not least create a subject that will be displayed each time you receive feedback as an email. So, the subject can be “feedback received”. Also, make a body that will contain all the details which the user filled in the feedback form.

How to build Web Development projects Did you know

Skyfi Labs helps students learn practical skills by building real-world projects.

You can enrol with friends and receive kits at your doorstep

You can learn from experts, build working projects, showcase skills to the world and grab the best jobs.
Get started today!


Kit required to develop How to create a feedback form and receive an email:
Technologies you will learn by working on How to create a feedback form and receive an email:
How to create a feedback form and receive an email
Skyfi Labs Last Updated: 2021-06-25





Join 250,000+ students from 36+ countries & develop practical skills by building projects

Get kits shipped in 24 hours. Build using online tutorials.

More Project Ideas on web-development

Web Development with PHP and MySQL
Creating a website using WordPress
Weather tracing application using pure java script
Webpage including form
E-commerce Website development using WordPress
Augmented Reality Web Browser using Unity
Creating a website with Bootstrap studio
SEO friendly website (web development project)
Parallax website (web development project)
A Basic Word Frequency Counter using Javascript
Creating a Login register form - Web development project
Making a review section on a web page without AJAX
NGO Activity portal project
Restaurant Website - Web development project
Payment Checkout Page Design with HTML and CSS
Designing a Calculator with HTML, CSS, JavaScript
Web Scraping Backend Web Development project using Node Js
Entertainment Web app - Front end Web Development project using react js
ToDo Web app using Django
Word Counter using HTML, CSS and Javascript
Design A Multi-page Responsive Website
How to create a search table for a website
How to create a feedback form and receive an email
How to create a website with HTML and CSS
Basic one page blog full stack web development project
Web-based chat application with webcam using PHP
Simple website using Bootstrap
How to Develop ATM Interface using JAVA?
How to create a Custom Icon? - Web development project
Build a To-Do list with JavaScript
Bulk SMS and Mail Sender project
MIS Portal for academics
How to create a product landing page?
Personal Portfolio Website Design using HTML, CSS, and JavaScript

Subscribe to receive more project ideas

Stay up-to-date and build projects on latest technologies