Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Passport renewal application Your information has been recorded First name: Juniper Last name: Henry Book size requested: Regular book (standard) Document type requested: Passport book
Passport renewal application Your information has been recorded First name: Juniper Last name: Henry Book size requested: Regular book (standard) Document type requested: Passport book and Passport card Date of birth: 2001/01/14 Drivers License number: AA123456 Old Passport number: 123456789 Email address: test@test.com We will verify all your information within 2 weeks and email you with the expected date of delivery of the new passport document Write your PHP program renew.php to perform the following checks on the user provided data and display a confirmation page or error page as described below: (Hints: You will need to use if-else statements and preg_match in some cases to perform these checks. Your code to perform these checks should be in the PHP. You may want to implement them in sequence.) 4. a. Empty value is not allowed for any of the fields (al fields are required as indicated by the red asterisk in the HTML page). If the field is empty, display a page with the error message: "You have not entered all the fields". Only the error message should be displayed and the user must click on back in the page to re-enter data in the form. A page like the one shown below should be displayed. (3 points) You have not entered all the required information Please go back to enter all the information and then submit the form. Date of birth should be in the format: YYYY/DD/MM, where YYYY stands for four digit year, DD stands for two digit of days, and MM stands for two digits of month. The forward slashes are required in the user input between the year, date and month. If incorrect date of birth is entered, the program should give an error message: "You have not entered your date of birth in the correct b. format". Only the error message should be displayed and the user must click on back to re-enter data in the form. Hint: Think about how to represent forward slashes in a regular expression- is it a special type of character? Page should look like the screenshot below: (4 points) You have not entered your date of birth in the correct format. Please go back to enter all the information and then submit the form. Passport renewal application Your information has been recorded First name: Juniper Last name: Henry Book size requested: Regular book (standard) Document type requested: Passport book and Passport card Date of birth: 2001/01/14 Drivers License number: AA123456 Old Passport number: 123456789 Email address: test@test.com We will verify all your information within 2 weeks and email you with the expected date of delivery of the new passport document Write your PHP program renew.php to perform the following checks on the user provided data and display a confirmation page or error page as described below: (Hints: You will need to use if-else statements and preg_match in some cases to perform these checks. Your code to perform these checks should be in the PHP. You may want to implement them in sequence.) 4. a. Empty value is not allowed for any of the fields (al fields are required as indicated by the red asterisk in the HTML page). If the field is empty, display a page with the error message: "You have not entered all the fields". Only the error message should be displayed and the user must click on back in the page to re-enter data in the form. A page like the one shown below should be displayed. (3 points) You have not entered all the required information Please go back to enter all the information and then submit the form. Date of birth should be in the format: YYYY/DD/MM, where YYYY stands for four digit year, DD stands for two digit of days, and MM stands for two digits of month. The forward slashes are required in the user input between the year, date and month. If incorrect date of birth is entered, the program should give an error message: "You have not entered your date of birth in the correct b. format". Only the error message should be displayed and the user must click on back to re-enter data in the form. Hint: Think about how to represent forward slashes in a regular expression- is it a special type of character? Page should look like the screenshot below: (4 points) You have not entered your date of birth in the correct format. Please go back to enter all the information and then submit the form
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