我不断收到此错误:
致命错误:第 34 行不支持的操作数类型
而且我不知道如何解决它,我正在努力让输入到表格中的数字(例如 10)成为折扣,它会与折扣价相呼应,谁能帮我解决这个问题,这是代码
<!DOCTYPE html>
<html>
<head>
<title> Car Shop Cars! </title>
<link rel="stylesheet" type="css/text" href="style.css"
</head>
<body>
<div id="header">
</div>
<div id="carpic">
</div>
<div id="price">
<center> This is the Nissan 350z and costs 8,999,999 <br>
please enter your promo code </center>
</div>
<div id="form">
<form action="index.php" method="post">
<center> <input type="text" name="percent" id="percent" />
<input type="submit" /> </center>
</form>
<?php
$percent=$_POST['percent'];
$total=['8,999,999'];
/*calculation for discounted price */
$discount_value= ($total / 100) *$percent;
$final_price = $total - $discount_value;
echo $final_price;
?>
</div>
</body>
</html>