Utilise an include statement to refer to connectionphp


In the Lecture Notes this week you were given the PHP code to produce a list of devices in the mobiles database and to update the fields for an existing device. The code for all the examples in the Lecture Notes is in the Lecture Note Code Examples zip file in this week's Learning

Resources. Supply the PHP code to do the following:

Add a new product to the database.

Delete an existing product from the database.

Utilise an include statement to refer to connection.php instead of the long version of the database connection code so that you can keep the database more secure. See Notes for more details.

When you are testing your script, you should only delete records which you have added. This way you will not accidentally remove records which you or your colleagues are expecting to find.

You should also consider how to validate the requests, i.e. you should not delete a record that is not there or add a product with an existing code. In particular, you should not use complex regular expressions without a detailed explanation of what each symbol means.


Attachment:- ASSIGNMENT.rar

Solution Preview :

Prepared by a verified Expert
Database Management System: Utilise an include statement to refer to connectionphp
Reference No:- TGS0652905

Now Priced at $40 (50% Discount)

Recommended (93%)

Rated (4.5/5)