I'm trying to make a simple php calculator which multiplies quantity to predefined prices. Here is my code but I got error 500. I can't manage to fix it by myself. It's html form with $_post checks and $_post submit button
// Check if form was submitted
$product = $_POST['product'];
$quantity = $_POST['quantity'];
$first = 0,6;
$second = 0,5;
$third = 2,8;
if ( isset($_POST['submit']) ) {
switch($_POST['product']) {
case '1':
$calculation = $quantity * $first;
echo "Цена" . $calculation;
break;
case '2':
$calculation = $quantity * $second;
echo "Цена" . $calculation;
break;
case '3':
$calculation = $quantity * $third;
echo "Цена" . $calculation;
break;
default:
}
}
?>
<form action="" method="post">
<select name="product" id="product">
<option>Choose servicve</option>
<option value="1">Service 1</option>
<option value="2">Service 2</option>
<option value="3">Service 3</option>
</select>
<br>
<input type="number" name="quantity" id="quantity">
<br>
<input type="submit" name="submit" value="submit">
</form><br /> ```