include "header.php"; include "db.php"; if($_GET['txn_id']) { $_GET['txn_id'] = addslashes($_GET['txn_id']); $query = $sql->query("SELECT buyer_id FROM {$GLOBALS['PURCHASE_TABLE']} WHERE txn_id = '{$_GET[txn_id]}' LIMIT 1"); $info = mysql_fetch_array($query); $_GET['userid'] = $info['buyer_id']; } include "includes/functions.php"; ?> if($_GET['userid']) { // if a userid is specified, list their purchases echo "