Re: Help!!! Can anybody help me with my script?

From: Date: Sat, 21 Jul 2001 05:23:02 +0000
Subject: Re: Help!!! Can anybody help me with my script?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10625@lists.php.net to get a copy of this message
Tony pressed the little lettered thingies in this order... > Thanks for your quick respond and your help. > This is great. > I have one more favor to ask you. As you know I am a beginner of PHP & > Mysql, do I put that language on all my product pages? It seems to be too > much work. Is there way that I can save main language that you wrote in to > one file as "stock.php3", and point a link from product html page with > known item number for "itemx"? And, print the result back to product html > page with "Out of Stock" or "In Stock". I will appreciate your help. Thanks > again for your help. Tony > Take a look at function() http://php.he.net/manual/en/functions.php and require: http://php.he.net/manual/en/function.require.php Define the code in the file you are requiring: function inStock($itemx) { ...do query here... ...echo result here... } And in your regular pages: require("file_with_functions.php"); inStock($itemx); That's about it. Good luck... Christopher Ostmo a.k.a. tech@AppIdeas.com AppIdeas.com Innovative Application Ideas Meeting cutting edge dynamic web site needs since the dawn of Internet time (1995) For a good time, http://www.AppIdeas.com/

« previous php.db (#10625) next »