Question: PART A: a. Create the database and table in MYSQL, PhpMyAdmin as shown below in the screenshot: Database Name: Product_YourID Table Name: Prod Field /

PART A:

a. Create the database and table in MYSQL, PhpMyAdmin as shown below in the screenshot:

Database Name: Product_YourID

Table Name: Prod

Field / Column Name

Datatype with size

Constraint

ProductID

Varchar(10)

Primary Key

ProductName

Varchar(30)

Price

Int

DateOfExpiry

Date

Manufacturer

Varchar(30)

PART A: a. Create the database and table in MYSQL, PhpMyAdmin as

Apply the following data validations upon the form fields values read from Add_Prod.html file:

ProductID*: (It is a mandatory field and should accept both character and number with minimum 3 and maximum 5 characters ex; P101).

ProductName: (It should accept only characters with spaces as special character with minimum 3 and maximum 30 characters ex: Milk).

Price*: ( It is mandatory field and should accept only numbers with minimum 1 and maximum 5 digits ex: 15).

Manufacturer: (should accept only characters with spaces as special characters with minimum 5 and maximum 30).

e. After the data validation write the query to insert/add the record(s) dynamically into the Prod table in Add_Process.php file.

PART D:

f. Create Display.php file to display all the record(s) from Prod table.

g. Create Search_Prod.html file to read ProductID from user.

h. Create Search_Prod.php file to read the ProductID form Search_Prod.html and display the record (if exist) from the table otherwise display the message record not found.

shown below in the screenshot: Database Name: Product_YourID Table Name: Prod Field/ Column Name Datatype with size Constraint ProductID Varchar(10) Primary Key ProductName

b. Create the input form (Add_Prod.html) to read the values from the user. (5 Marks) Makkah Hyper Markeyt Product ID*: P101 Product Name: Milk Price*: 3 DateOfExpiry: 01/04/2021 Manufacturer: Almarai Add/Insert PART C: c. Create dbconnect.php file to connect to the Product_YourID database in MYSQL of PhpMyAdmin. (2 Marks) d. Create Add_Process.php file, first read all the form field values sent from Add_Prod.html file and apply the server-side validations on the form fields before add/insert the new record(s) into the table. Sample output screenshots: Display.php Makkah Hyper Market Product's List ProductID Product Name Price DateOfExpiry Manufacturer P123 Milk 3 2021-01-04 Almarai P124 Olive Oil 5 2021-01-10 Rehma P125 Lamb meat 15 2020-01-02 New Zealand P126 Wheat Flour 2 2022-10-12 India Home Search_Prod.html Enter Product ID to search the product Product ID. P123 Search Search_Prod.php Product Information ProductID Product Name Price DateOfExpiry Manufacturer P123 Milk 32021-01-04 Almarai Home

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!