Help please.

From: Date: Fri, 01 Nov 2002 14:04:21 +0000
Subject: Help please.
Groups: php.general 
Request: Send a blank email to php-general+get-122419@lists.php.net to get a copy of this message
Hi, I have been trying for most of the day to pull a variable from a db. Finally managed that. Now I need to pass the result of a function to another function. How do you do this? I assume the following if called in another page can be used? function get_shipping($shipping) { $conn = db_connect(); $query = "SELECT * FROM receipts ORDER BY receipt_id DESC LIMIT 1"; $result = mysql_query($query); //$shippingvar = $myrow["shipping"]; if(mysql_numrows($result)>0) $shipping = mysql_result($result, 0, "shipping"); return $shipping; } If I return $shipping how can I display that? I have called it in another page by doing get_shipping($shipping) And then Echo "test $shipping"; But that doesn't work. Ideas where I'm going wrong this time? Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com stephen.jackson@violasystems.com Mobile +358 50 343 5159

« previous php.general (#122419) next »