Can anyone see why I am having problems with this page. I'm trying to connect to the DB and display results using the function get_order_id_receipt. The DB connection works because I can produce the cart based on the users session so I don't get why this doesn't work.... <? include ('products_fns.php'); include ('order_fns.php'); include ('db_fns.php'); include ('output_fns.php'); // The shopping cart needs sessions, so start one session_start(); do_html_header("Please print out this page for your records."); function get_order_id_receipt($orderid, $shipping) { //Get order ID from DB to pass to receipt. $conn = db_connect(); $query = "select orderid from receipts"; $shippingquery = "select shipping from receipts"; $orderid = mysql_result($query); $shipping = mysql_result($shippingquery); //return $orderid; } //debug test echo mysql_error(); echo "test & $orderid"; echo "test & $shipping"; display_receipt($orderid); echo "<table width='760' cellpadding='0' background='images/shopbg.gif'><tr><td> </td></tr></table>"; display_cart($cart, false, 0); echo "<table width='760' cellpadding='0' background='images/shopbg.gif'><tr><td> </td></tr></table>"; echo "<table width='760' cellpadding='0' background='images/shopbg.gif'><tr><td> </td></tr></table>"; display_success_form(); //empty shopping cart //session_destroy(); do_html_footer(); ?>
Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com <http://www.violasystems.com/> [EMAIL PROTECTED] Mobile +358 50 343 5159