delete products and some improvements

function added to delete a product from the database.
Another function added which returns the type of request- used to
confirm the request type before proceeding to process it.