I am puzzled and I don’t know how to proceed, anyone could give me some instructions?
HERE ARE THE INSTRUCTIONS OF THE EXERCISE:
Think about the data management of the supermarket products.
Create a page Receive.php that takes values in input using the $_POST method
A field ‘name’ (the name of the product)
A fiel ‘price’
$_FILESan image related to the product.
Once the data have been received in input:
- create a file ‘
with the following structure:
NAME, PRICE, IMAGE
PS: IMAGE will hold the path associated with the image
- Reduce the resolution of the image to the half of its previous one and save it on the server that will host the page Receive.php
For example if the image received has as
resolution 800x600, the resized image will be 400x300
I came up with the following solution using w3 schools and some other resources but I don’t know if it works.