Question
Use PHP to build a form that will allow a user to type in the price of a candy in addition the number of quarters,
Use PHP to build a form that will allow a user to type in the price of a candy in addition the number of quarters, dimes, and nickels they have. After the user submits their information, the form should tell them how much money they have, how many candies they can buy, and what their change will be. The form should check to make sure valid information was typed in (use is_numeric() and empty().) and let the user know if their info was wrong via output to the page.Add an input for pennies and let the user know what kind of change they would get back in quarters, dimes, nickels, and pennies.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started