Question: PHP CODE Your task is to create a customer registry using PHP. Customers can be added to the registry, or deleted from it by providing

PHP CODE

Your task is to create a customer registry using PHP. Customers can be added to the registry, or deleted from it by providing an existing customer number. The customer number can also be used to fetch the information of a specific customer. The performed action depends on the value of the sent "mode" parameter. If the value is "save", a customer should be added to the registry. If it's "delete", a customer should be deleted. With any other value, the customer's information should be shown. If the specified customer can't be found from the file, nothing is printed. The customer information is saved into a file named customerregistry.txt, with the customer number, customer's name and address. The pieces of information are separated from each other by 2 number signs # and each customer's info should be on its own line. An example on the file's structure below:

12345##First Customer##Some Street 1 54321##Second Customer##Random Road 2

The forms for deleting or fetching a customer's information contain a hidden mode field and a single text input field customer, which is the target customer's customernumber. The form for adding customers is as follows:

Customer number: Name: Address:

Example output:

Customer: Johon Solutions, Laser Lane 6

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!