I keep getting the following error for this function.
Parse error: syntax error, unexpected '$tempsql' (T_VARIABLE) in /home/vps20119/public_html/outlet/admin/internal/dcOrderFunctions.php on line 6
I don't get it. I can't find any syntax errors before I start defining / declaring the $tempsql. What am I over looking? Below is a copy of the entire file.
<?php
//A function to extract the QC from the Order number
function orderGetQC($dropcomOrderID){
            //Get the Product ID from the order.
            $tempsql = "SELECT * FROM `oc_order_product` WHERE `order_id` = '". $dropcomOrderID ."'";
            //runs the query (above) and puts the resulting data into a variable called $orderInfo.
            $orderInfo = $conn->query($tempsql);
            $temprow = $orderInfo->fetch_assoc();
            $productID = $temprow['product_id'];
            //Get the QC from the product ID.
            $tempsql2 = "SELECT * FROM `multi_quantity_received` WHERE `product_id` = '". $productID ."'";
            //runs the query (above) and puts the resulting data into a variable called $productInfo.
            $productInfo = $conn->query($tempsql2);
            $temprow2 = $productInfo->fetch_assoc();
            if( $productInfo->num_rows > 1){
                $QC = "multipleQCs";
            } else {
                $QC = $temprow2['qc'];
            }
            return $QC;
}
?>
 
    