Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am trying to round red lipstick to two decimal places and brown lipstick to round three decimal places once calculated. HTML file lab4 Select
I am trying to round red lipstick to two decimal places and brown lipstick to round three decimal places once calculated.
HTML file
Select lipstick
PHP file
if(isset($_GET["choice"])){
$lipstick=$_GET["choice"];
$c= count($lipstick);
$price= 0.0;
for($i=0;$i<$c;$i++) {
if($lipstick[$i]==1){
$price=$price+2.5136;
echo "You have selected Red Lipstick ";
}
if($lipstick[$i]==2){
$price=$price+1.76459;
echo "You have selected Brown Lipstick ";
}
}
echo "Final Price is: " .$price. " ";
}
else{
echo "Please choose something!";
}
?>
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