Menu

Exercise Going Create New Php File Called Exercise 2php File Connect Autoservice Database Q43873869

For this exercise, you are going to create a new PHP file calledexercise-2.php. This file will connect to your autoservice database(what you connected to in Practical Class 7) and display theclient’s name and the cars related to the client name clicked inexercise-1.php (Part of Exercise 1). You will need to use thecustomercar database table – refer figure 2

The output should look like figure 3

Client Name Suburb Mary Hadalittlelamb Meadowville Buzz** Lightyear **IntergalacticHQ Ilene Over Campbelltown Simple Ton Brad

customer id INT(11) custNum INT(11) title VARCHAR(20) firstName VARCHAR(20) familyName VARCHAR(30) contact VARCHAR(10) email

Hint: To tackle this exercise focus on selecting all cars for a particular customer first, and then focus on getting the data

Could you please screenshot result and post php code

Client Name Suburb Mary Hadalittlelamb Meadowville Buzz** Lightyear **IntergalacticHQ Ilene Over Campbelltown Simple Ton Bradbury Under Standing Camden Cam Figure 1 customer id INT(11) custNum INT(11) title VARCHAR(20) firstName VARCHAR(20) familyName VARCHAR(30) contact VARCHAR(10) email VARCHAR(60) houseNum VARCHAR(10) street VARCHAR(20) suburb VARCHAR(20) state VARCHAR(3) postCode VARCHAR(4) Indexes u customercar id INT(11) custNum INT(11) rego VARCHAR(6) make VARCHAR(15) model VARCHAR(30) yearMan 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 Show transcribed image text Client Name Suburb Mary Hadalittlelamb Meadowville Buzz** Lightyear **IntergalacticHQ Ilene Over Campbelltown Simple Ton Bradbury Under Standing Camden Cam Figure 1
customer id INT(11) custNum INT(11) title VARCHAR(20) firstName VARCHAR(20) familyName VARCHAR(30) contact VARCHAR(10) email VARCHAR(60) houseNum VARCHAR(10) street VARCHAR(20) suburb VARCHAR(20) state VARCHAR(3) postCode VARCHAR(4) Indexes u customercar id INT(11) custNum INT(11) rego VARCHAR(6) make VARCHAR(15) model VARCHAR(30) yearMan 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

Expert Answer


Answer to For this exercise, you are going to create a new PHP file called exercise-2.php. This file will connect to your autoserv…

OR