Question: Write a PHP script using regular expressions for validating the data submitted by a form with two text fields, simplified IP address and date as
Write a PHP script using regular expressions for validating the data submitted by a form with two text fields, simplified IP address and date as shown in the nine screenshots of my browser window. The required format for the IP address containing digits separated by dot character '.' is: ddd.ddd.d.dd, while the required date format is mm/dd/yyyy. The script will accept the inputs from textboxes. Hint: Along with input validation it is also important that any data the user has already entered remains on the form. This means that the form returned when the input does not pass the validation should remember the entered values (it should be sticky). My PHP Forms PowerPoint slides (p. 32-55) show how to do that.






X Displaying errors - Windows Internet Explorer e http://localhost:8000/Exam/Lab26.php X Bing File Edit View Favorites Tools Help startnow Search with Bing Search Shopping Games " Travel MSN a Amazon egy eBay e Displaying errors - Page - Tools - - 7 18 Enter your IP addresses (dddddd.d.dd): Enter the current date (mm/dd/yyyy): submit Done Local intranet + 100% 35waoZ 9:53 PM Hstart I.. D.. B.. D. D.. WC.. CD. c. WL.. Firefox Displaying errors X localhost:8000/Exam/lab26.php c O Bing Most visited Getting Started by Latest Headlines M Customize Links Free Hotmail Windows Marketplace Windows Media Windows M Customize Links * Bookmarks Your IP address is ok. Enter your IP addresses (ddddddddd): 111.222.3.44 Enter the current date (mm/dd/yyyy): submit The date is empty You need to resubmit the form Hstart I. B e. D. WC. es CH C W L. 7 10:10 PM Firefox Displaying errors X >> o localhost:8000/Exam/lab26.php c O Bing Most visited Getting Started by Latest Headlines M Customize Links Free Hotmail Windows Marketplace Windows Media Windows M Customize Links * Bookmarks Your IP address is ok. Enter your IP addresses (ddddddddd): 111.222.3.99999 Enter the current date (mm/dd/yyyy): 06-12-2011 submit The date format is incorrect You need to resubmit the form Hstart I. B e. D. WC. es CH C W L. wao Z 10:03 PM || Displaying errors - Windows Internet Explorer e http://localhost:8000/Lab25-My.php 0 Bing File Edit View Favorites Tools Help x startnow Search with Bing Search Shopping Games Travel MSHI a Amazon ety eBay 5 Favorites Suggested Sites - Free Hotmail e Upgrade Your Browser e Displaying errors Page Safety Tools - - 7 Enter your IP addresses (dddddd.d.dd): 123.456.7.999999 Enter the current date (mm/dd/yyyy): 06-12-2011 submit The IP address is incorrect The date format is incorrect You need to resubmit the form Local intranet + 100% Woo 2:23 PM start 4 ed . . || Displaying errors - Windows Internet Explorer e http://localhost:8000/Lab25-My.php 0 Bing File Edit View Favorites Tools Help x startnow Search with Bing Search Shopping Games Travel MSHI a Amazon ety eBay 5 Favorites Suggested Sites - Free Hotmail e Upgrade Your Browser e Displaying errors Page Safety Tools - - 7 Enter your IP addresses (ddddddddd): 123.456.7.99 Enter the current date (mm/dd/yyyy): 04/24/2012 submit The IP address is incorrect The date format is incorrect You need to resubmit the form Local intranet + 100% wono. 2:27 PM start 4 ed . . || Displaying errors - Windows Internet Explorer e http://localhost:8000/Lab25-My.php 0 Bing File Edit View Favorites Tools Help x startnow Search with Bing Search Shopping Games Travel MSHI a Amazon ety eBay 5 Favorites Suggested Sites - Free Hotmail e Upgrade Your Browser e Displaying errors Page Safety Tools - - 7 Your IP address is ok. The date format is ok. Thank you, for submitting your information! Done Local intranet + 100% wono. 2:27 PM Hstart 4 ed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
