title: extract() error with customer orders in php
body: <p>I am having problems with my customer order php file I am creating.</p>
  
  <p>I am trying to select the stockID from my Stock table and the userID and orderID from my Orders table. </p>
  
  <p>This will then be inserted into my Ordered_Items table.</p>
  
  <p>It works fine with 1 item being ordered, however when multiple items are ordered it shows the following error: </p>
  
  <p>Warning: extract(): First argument should be an array in /home/k0900863/www/Coursework/order.php on line 101</p>
  
  <pre><code>foreach ($cart as $id=&gt;$no)
     {
        $result=mysql_query("SELECT * FROM Stock WHERE stockID='$id'");
        $row=mysql_fetch_array($result);
        extract($row); // Line 101
        $result2=mysql_query("SELECT MAX(orderID) FROM Orders WHERE userID='$userID'");
        $row2=mysql_fetch_array($result2);
        extract($row2);
        mysql_query("INSERT INTO Ordered_Items (stockID, units, orderID) 
                     VALUES ('$id', '$no', '$orderID')");   
     }
  </code></pre>