title: Discounts with PHP
body: <p>I keep getting this error:</p>
  
  <blockquote>
    <p>Fatal error: Unsupported operand types on line 34</p>
  </blockquote>
  
  <p>And I'm not sure how to fix it, i am trying to make it so that the number that is entered into the form such as 10, will be the discount and it will echo the discounted price, can anyone help me fix this, here is the code </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt; Car Shop Cars! &lt;/title&gt;
  &lt;link rel="stylesheet" type="css/text" href="style.css" 
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div id="header"&gt; 
  &lt;/div&gt;
  
  &lt;div id="carpic"&gt;
  &lt;/div&gt;
  
  &lt;div id="price"&gt;
  &lt;center&gt; This is the Nissan 350z and costs 8,999,999 &lt;br&gt;
  please enter your promo code &lt;/center&gt;
  &lt;/div&gt;
  
  &lt;div id="form"&gt;
  &lt;form action="index.php" method="post"&gt;
  
     &lt;center&gt; &lt;input type="text" name="percent" id="percent" /&gt;
    &lt;input type="submit"  /&gt; &lt;/center&gt;
  
  &lt;/form&gt; 
  &lt;?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;
  
  ?&gt; 
  &lt;/div&gt;
  
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>