Create contact form with PHP, JavaScript and CSS
5.0 (1 rating)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
10 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Create contact form with PHP, JavaScript and CSS to your Wishlist.

Add to Wishlist

Create contact form with PHP, JavaScript and CSS

Learn how to build a fully functional contact form and start getting users feedback.
5.0 (1 rating)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
10 students enrolled
Created by Nevyan Neykov
Last updated 6/2017
English
Current price: $12 Original price: $35 Discount: 66% off
3 days left at this price!
30-Day Money-Back Guarantee
Includes:
  • 1 hour on-demand video
  • 1 Article
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion

Training 5 or more people?

Get your team access to Udemy's top 2,000 courses anytime, anywhere.

Try Udemy for Business
What Will I Learn?
  • Understand how to build and embed into their website a custom made contact form.
  • To see how easy is to create contact from scratch.
  • Gain skills to apply contact form to their website.
View Curriculum
Requirements
  • You should have access to your website files, and being able to edit them.
  • basic HTML skills
Description

During this course you will learn how to build and add to your website a fully functional contact form, using PHP, CSS and JavaScript. The form is suitable for getting users feedback, while the user experience will be enhanced with success and error messages.

Following the lectures will let you practice step by step the creation process. During the course you will understand how to set your page, create an HTML form, stylize it with CSS and later process it with PHP and JavaScript. In the course you can find practical lecture devoted in adding additional protection against Spam bot submission attacks. You will also gain solid understanding on the whole build process so you can start receiving messages from your users.

At first we will take a look at what you will be creating during the course, then will structure the initial files so we can start building the form. Next we add our PHP code to process the information received from the contact form and validate the submitted data with the help of PHP and JavaScript. We will conclude by adding various methods of protection to our form against unwanted Spam bots.

Enjoy the course today !

Who is the target audience?
  • Students who want to place contact form into their website with the help of PHP language.
  • Students who want to learn how to create contact forms.
Compare to Other PHP Courses
Curriculum For This Course
+
Contact Form
10 Lectures 47:46

We will take a look at what you will be creating during the course.

Preview 01:31

We will structure the initial files and construct the Form with its specific form fields. We will start with using editor Sublime text to create our .php and .css. Then we will link those files and run them in a browser.

Create the form in PHP, HTML and CSS
08:11

We will add code to process the information received from the contact form. We will use php's $_POST array to access the submitted information and will redisplay our form filled with information.

Preview 08:19

Server validation is needed because users could find a way to submit our data bypassing the HTML5 and JavaScript checks. In this lecture we will process and validate the user submitted data with php. We will move function validate() into separate file and will check for empty submitted fields as well as for valid email address. Next we use php functions to escape the user input so if someone submits HTML code through our form, it would not get displayed.

Server validation
06:35

We will make improvements to our code to become more readable and easy to maintain. We will continue exploring and extending our validate() function by removing some of the variables used, replacing them with functional return statements.

Code cleanup
07:24

We will protect the form from several attacks using token and empty fields. Token protection is to ensure protection against scenario, where we visit an attacker website, specially designed to make request and submit our form, without our knowledge. This type of an attack is also known as cross-site-request-forgery. Empty field technique will stop bots from auto submitting the form.

Form security
05:15

We will save the data from the form to a text file. Each new data will get appended to the file. This way we can later open the file to see users feedback.

Preview 03:58

We will add easy client-side validation using HTML5 validation attributes. Validation will be added supporting empty fields, fields of a required legtht as well as basic email check.

HTML5 validation
02:05

We will add validation support for older browser with the help of JavaScript. We will do checks by examining each of the fields, then display errors directly to the form, without the need of server validation.

JavaScript validation
04:23

You can practice your skills using the source files. Just extract them to an executable folder of your web-server and open them in the browser.

Course materials
00:05
About the Instructor
Nevyan Neykov
5.0 Average rating
1 Review
14 Students
5 Courses
SEO and WebDevelopment consultant

I do web design, development and implementing SEO for more than 15 years. Have been working in various companies dealing mainly with PHP and JavaScript. 

Right now pursuing a computer science PhD in Bulgaria, where usually teach students on interactive web programming. 

Independently as well as in teams, am involved in design and development of an user friendly websites.