Computers and Technology
Computers and Technology, 16.10.2020 04:01, taryn1932

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 03:30, natalie2sheffield
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
image
Computers and Technology, 23.06.2019 17:30, Annlee23
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
image
Computers and Technology, 24.06.2019 00:40, ndurairajownkpq
What social factors affect your health
Answers: 3
image
Computers and Technology, 24.06.2019 12:00, log40
Jack is assisting his younger sibling mary with her mathematics assignment, which includes a study of the number system. jack explains to mary that whole numbers are counting numbers that could be used to record the number of fruits in a basket. which data type represents whole numbers? a. integers. b.floating-point numbers. c. strings. d.boolean
Answers: 1
Do you know the correct answer?
Assignment Create an HTML form that will accept four fields: pet name, pet ID, pet weight, and birt...

Questions in other subjects:

Konu
Mathematics, 30.03.2020 08:11