Question
Create the following folder structure in your htdocs folder on your computer: validation js img css Create the following file(s) on your computer in the
Create the following folder structure in your htdocs folder on your computer: validation js img css Create the following file(s) on your computer in the validation folder: index.php process.php In the index.php file: Create a standard web page with all the basics (doctype, html tag, head tag, body, etc.) In the body of the page, create a web form that asks for the user email and phone number. be sure to include a reset button be sure to include a submit button when submitted it will send the data to the process.php file. In the process.php file: Again create the standard web page basics. Using PHP, retrieve the data via the POST from the index.php page. Use regular expression techniques and function(s) to validate the phone number and email address For phone numbers, only allow this format: (xxx)xxx-xxxx. Be sure to create this one from scratch For email address, do some research online to find an existing regular expression for email validation and use it. If the data is valid, then display a message on the screen that includes the data along with a "thank you" message stating that the data is valid Be sure to include the data in the output Get creative and have fun Be sure to style the page with CSS in an external style sheet that you will place in your css folder. If the data does not validate, then do the following Return to the index.php page On the index.php display an error message that is appropriate for the mistake. If they got the email correct, but missed the phone, the message will specifically state that the phone is wrong. If they got the phone correct, but missed the email, the message will specifically state that the email is wrong. If they miss both, then the message will state that both the phone AND email are wrong. Lastly, be sure to retain (in the input boxes) the original data entered in the fields so that the user doesn't have to completely retype everything. This allows them to see their original entry and edit it if need be Test the site: Make sure that home page properly passes the data to the process page. Make sure that you test all three error scenarios (phone only, email only, both) Make sure all error messages, and "correct" Make sure that you CSS works correctly Upload the site: Once the site has been tested, upload the validation directory to your server in the htdocs folder on your server. Test the site again once it's uploaded and live Miscellaneous Notes: Do NOT use HTML validation (i.e., the "required" property)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started