Question: For this exercise, you have been given the file exercise-3.html. Within this file is a form with the fields required to insert a new record

For this exercise, you have been given the file exercise-3.html. Within this file is a form with the fields required to insert a new record into the customer database table. You are to create another file, exercise-3.php, which will process the input from exercise-3.html which is sent via the POST method.

Using the schema in figure 2 and the data received from exercise-3.html insert a new record into the database. Upon success, print to the page Successfully Added a New Record to the Customer Table with the ID of: #. The # represents the last inserted ID. If it fails, Failed to insert new record should be printed to the page.

For maximum marks for this exercise your data needs to be sanitised and validate for type and size in PHP.

html code:

Exercise 3

For this exercise, you have been given the file exercise-3.html. Within this

file is a form with the fields required to insert a new

record into the customer database table. You are to create another file,

Please screenshot result and post php code

Client Name Suburb Mary Hadalittlelamb Meadowville Buzz** Lightyear **IntergalacticHQ Campbelltown Bradbury Ilene Over Simple Ton Under Standing Camden Figure 1 customer customercar id INT(11) id INT(11) custNum INT(11) custNum INT(11) O title VARCHAR(20) rego VARCHAR(6) make VARCHAR(15) firstName VARCHAR(20) familyName VARCHAR(30) contact VARCHAR(10) model VARCHAR(30) yearMan VARCHAR(4) email VARCHAR(60) Indexes houseNum VARCHAR(10) street VARCHAR(20) suburb VARCHAR(20) state VARCHAR(3) postCode VARCHAR(4) Indexes Figure 2 Hint: To tackle this exercise focus on selecting all cars for a particular customer first, and then focus on getting the data from the GET request to perform your query. Remember, you should sanitise anything which is derived from the user! Cars for Simple Ton Rego: SMART, Make: Smart, Model: Fortwo Turbo Coupe, Year: 2010 Figure 3 Client Name Suburb Mary Hadalittlelamb Meadowville Buzz** Lightyear **IntergalacticHQ Campbelltown Bradbury Ilene Over Simple Ton Under Standing Camden Figure 1 customer customercar id INT(11) id INT(11) custNum INT(11) custNum INT(11) O title VARCHAR(20) rego VARCHAR(6) make VARCHAR(15) firstName VARCHAR(20) familyName VARCHAR(30) contact VARCHAR(10) model VARCHAR(30) yearMan VARCHAR(4) email VARCHAR(60) Indexes houseNum VARCHAR(10) street VARCHAR(20) suburb VARCHAR(20) state VARCHAR(3) postCode VARCHAR(4) Indexes Figure 2 Hint: To tackle this exercise focus on selecting all cars for a particular customer first, and then focus on getting the data from the GET request to perform your query. Remember, you should sanitise anything which is derived from the user! Cars for Simple Ton Rego: SMART, Make: Smart, Model: Fortwo Turbo Coupe, Year: 2010 Figure 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!