changed ingredient_add.html to .php and refactored logic