In this video we are going to create a simple contact form. you can see here at the moment we just got to text fields and a text area the idea here is these are filled out the form click Submit and this is sent through to an email address with the relevant data.
Learn PHP Programming from Scratch: https://www.simplilearn.com/web-app-and-programming/learn-php-programming-from-scratch?utm_campaign=how-to-create-form-iykJl6iXCao&utm_medium=SC&utm_source=youtube
let’s go ahead and type in my name, is hoping a valid email address, now this form field here will be invalidated so the user will have to provide a valid email address and also message as well, we go ahead and click on Submit, has been submitted we’ve got this confirmation message thanks for contacting us an important point here is that we can’t then go ahead and refresh the page to resend it because essentially seeing this sent variable hear, about that in a moment they have now received an email from Alex from PHP academy he can we talk which is the email address that we supplied and we’ve also got the message in here, now the good thing about this is we’ve supplied the email address that’s been provided and we’ve put this into the From field so we can basically hit reply and this will then send us back to the email address that the user has provided. So essentially just a really quick way to get a contact form submission sent you an email address and then the ability to go ahead and reply email directly. so that’s basically it let’s just quickly take a look at what happens when we don’t enter anything which is here we have a message here so error message that the name email messages are required to let’s go ahead and fill the end but just so Alex in the email field for example and then just hello in here when I click Submit we get that validate email address so we validating this field here many other good thing about this is that you noticed that these form fields have retained their values we’ve refresh the page but we haven’t actually got rid of these values which browsers will do by the fall so we’re keeping these values as well so we’ll be discussing all these points and creating a basic contact form so in the next part will be starting to write the mark-up and then we’ll look at some PHP code.
So watch the full video to learn more.
For more updates on courses and tips follow us on:
– Facebook : https://www.facebook.com/Simplilearn
– Twitter: https://twitter.com/simplilearn
Get the android app: http://bit.ly/1WlVo4u
Get the iOS app: http://apple.co/1HIO5J0