# get the product ID out of session key function custom_get_prodId($productkey){ $pid = explode(':',$productkey); return $pid[0]; } #get the product data function custom_get_product($prodID,$return='all'){ global $db; reset($data); $q = sprintf("SELECT pd.products_name, pd.products_description, cd.categories_name, p.products_price FROM categories_description AS cd, products AS p, products_description AS pd WHERE p.products_id = 183 AND p.master_categories_id = cd.categories_id AND p.products_id = pd.products_id",$prodID); $res = $db->Execute($q); return $res->fields; } # get the current user's data function custom_get_userinfo($custID){ global $db; reset($data); $q = sprintf("SELECT ab.entry_street_address, ab.entry_postcode, ab.entry_city, ab.entry_state, c.countries_name, c.countries_iso_code_2 FROM address_book AS ab, countries AS c WHERE customers_id=%d AND ab.entry_country_id = c.countries_id ",(int)$custID); $res = $db->Execute($q); return $res->fields; } Magnet America Online Store, A leading provider of high Quality Car Magnets, Decals, Patriotic Products, Awareness Products, Promotional Products and more, Made in the USA