Answered step by step
Verified Expert Solution
Question
1 Approved Answer
HTML code given : Exercise 3 label { width:150px; display:inline-block; } Customer Number: Title: Select Title Mr Miss Ms Dr Prof First Name: Family Name:
HTML code given :
---
could you please write me the php code and a screenshot of the output who it works
thank you
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. To view if a record has been inserted successfully, use the listdata. php file found within the Major Assignment folder on VUWS. Don't forget you have to put your database details in the connection settings of the file for it to work. For maximum marks for this exercise your data needs to be sanitised and validate for type and size in PHP. 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 customercar id INT(11) custNum INT(11) rego VARCHAR(6) make VARCHAR(15) model VARCHAR(30) year Man VARCHAR(4) Indexes Figure 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started