使用此代码
<?PHP
include("dbconnection.PHP");
if ($_SESSION["loggedin"] != "true") {
header("Location:memberlogin.PHP");
}
$cust_id = $_SESSION["cust_id"];
$result = MysqL_query("select customer.*, product.*, order_details.* from customer, product,
order_details where customer.cust_id=$cust_id and product.pro_id=product.pro_id and
order_details.order_details_id = order_details.order_details_id")or die(MysqL_error());
$row = MysqL_fetch_assoc($result);
?>