//create fm instance require_once 'includes/db.php'; //cart includes include("includes/functions.php"); if($_REQUEST['command']=='add' && $_REQUEST['productid']>0){ $pid=$_REQUEST['productid']; addtocart($pid,1); header("location:shoppingcart.php"); exit(); } $record = $fm->getRecordById('emart_products', $_GET['recid']); if (FileMaker::isError($result)) { echo "Error: " . $result->getMessage() . "\n"; exit; } ?>