subject

Assignment Create an HTML form that will accept four fields: pet name, pet ID, pet weight, and birthdate. Name this file petInfo. html. There should be a submit and reset button on your html form. Your input fields for your form should be inside of a table. The submit button should send the data to a php file named updateInfo. php. The updateInfo. php file should check the data submitted by the html file for proper formatting. While it is allowable that you may check input on the client side (either HTML or Javascript), you MUST check for valid input on the server using PHP.
***IMPORTANT***
Your POST variables in your HTML file must be labeled as follows. I have written an automated script to run tests on your code, and it depends on the POST variables being labeled correctly within the HTML Form.
1) "pet_name"
2) "pet_id"
3) "pet_weight"
4) "birth_date"
The following rules must be enforced by your PHP script about the input.
β€’ No field is allowed to be blank.
β€’ Maximum length of pet name is 20 characters.
β€’ Pet ID must be 4 lowercase letters followed by 3 numbers. Example: abcd123
β€’ Max length of pet weight is 7 characters. Max of two digits after decimal point. Must be a positive value. Range: 0.00 – 9999.99.
β€’ The name should be only made up of alphabetical characters. (no numbers or symbols).
β€’ Birthdate should be in the format 1/1/2002. Examples of valid input: 01/01/2002, 12/1/1999, 12/25/2015. Do not allow: 12/25/02 (The whole year should appear in the input).
If all the fields are valid, your PHP script should save the data into a file named petInfo. txt which should have the following format, and be sorted by "pet_name". Put each record on its own line. To simplify things, you can assume that Names are unique - i. e. you can use the name as a key for your associative array. (I won't use two of the same name when I test your code).
PetName, PetID, PetWeight, PetBirthDate\n
Once the new data has been received, you should also display ALL data that has been entered into the text file from your PHP script into an HTML table. The table should be sorted by last name just like the text file. After successfully displaying your table, create a link back to the petInfo. html page.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:50
Click on this link toopens a new window. bring up a flowchart in a new browser window. based on this flowchart, would a d-link 3347 gateway with an xbox 360 multiplayer problem be in scope or out of scope
Answers: 2
question
Computers and Technology, 22.06.2019 07:20
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display β€œenter a value to be cubed.” input value; set cube = value ^ 3 display value, β€œ cubed is β€œ, cube end while
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
1. web and mobile applications allow users to be actively engaged in an online activity. a true b false 2. some examples of business applications purposes are to collaborate, share files, meet virtually in real-time, and accept payments. a true b false 3. an education application would most likely do which of the following? a allow users to watch popular movies and tv shows b connect users with social and business contacts c confirm users' travel plans d teach users a new language 4. a uniform resource locator (url) is how the internet knows where to take users when an address is typed into a browser. a true b false 5. deon is required to provide the citation information for his sources. what type of information should he collect from his sources? a author name, title, date of publication, date of access, url b connections to background information c interesting facts and statistics d notes on important information
Answers: 1
You know the right answer?
Assignment Create an HTML form that will accept four fields: pet name, pet ID, pet weight, and birt...
Questions