Question: Write a PHP script that validates each input field in the form shown below. If the input is valid and error - free, save the
Write a PHP script that validates each input field in the form shown below.
If the input is valid and errorfree, save the data to a database of your choice and display a success message to the user. If there are errors, prompt the user to correct them before allowing the form to be submitted.
Expected outputs: Contact Us
First Name:
Last Name:
Email:
Phone Number:
Message:
Send Message
First Name is required.
Last Name is required.
Email is required.
Phone Number is required.
Message is required.
Contact Us
First Name:
Email:
Message:
Last Name:
Phone Number:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
