shopping cart using $_session and send product name and quantity how can I send total cost at same time
<p>below is the code am using to send product name and quantity, this works perfect I want to send a total cost at the same time that name and quantity get sent but am not sure how to go about doing this as am pretty new to php so thanks in advance</p>

<pre><code>&lt;?php
  if (isset($_POST['form_products'])) {
    $quantity=$_POST['quantity'];
    $total = $the_price_is * $quantity; // want to be able to send $total at same time
    $order = array($_POST['dryer']=&gt;$_POST['quantity']);
    if (!empty($_SESSION['products'])) {
      foreach($_SESSION['products'] as $name =&gt; $quantity_value){
        if (isset($order[$name])){
          print "&lt;br&gt;Your order as been added to your cart";
          $order[$name]+=$quantity_value;
        }
      }
      $order = array_unique(array_merge($_SESSION['products'], $order));
    }
    $_SESSION['products'] = $order; 
  }
</code></pre>
