Create a php page through which you can connect to the grocery database and you can insert information into the grocery table.

PHP Question

Items marked in orange are the new tasks.

Using mysql client

A. Create a database named Supermarket. Change the password.

B. Create a table named grocery in the supermarket database. Grocery table should have the following information : itemname, itemtype(i.e fruit or vegetable), item description, price per unit, quantity available. Use appropriate data type for each of the columns. Itemname should be the primary key.

2.Create a php page through which you can connect to the grocery database and you can insert information into the grocery table.

The php page displays an interface , texboxes for itemname , textfield for item description, radio button for item type, text box for unit price , text box for quantity available and a submit button. Both the inteface page and the page handling should be in the same php script.

Once you click the submit button the php file should first validate the data types inserted. After successfully adding a row of information the same php page should show a confirmation message about successful information in the table.

Make all the texboxes, texfields and the radio buttons used for item-type sticky.

3.Create a page in your website that will show the items in the grocery table.

The grocery items should be displayed in multiple pages. Each page will show 5 items. There should be links to previous page , next page ….

Sort the grocery items by name, price, type and amount by clicking the column headings

Add options on the page to delete records from the grocery table. Also add option to edit records in the grocery table.

4.Create a table named users in the supermarket database. It will have username , email address, password field. Registration date will be added to the table automatically.

Create a page to register new users. Validate the fields before inserting new data into user table.

Create another page to change password. Validate against the old password to change to new password.

5.Make a login and logout page use cookies or session to

 

Create a php page through which you can connect to the grocery database and you can insert information into the grocery table.
Scroll to top