Re: Tip for cookies
| From: | Joe Stump | Date: | Wed, 18 Apr 2001 01:44:33 +0000 |
| Subject: | Re: Tip for cookies | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49105@lists.php.net to get a copy of this message | ||
Check out "global" it allows you to make things "global" or at the top of your
file you could do a define with the cookie value in it an it would be accessbile
without passing the value to the function - this saves both time in typeing
and is faster since it doesn't have to copy the cookie value to a local variable
each time it is used in a function.
--Joe
On Tue, Apr 17, 2001 at 06:36:45PM -0400, Pat Hanna wrote:
> I found out today after suffering from minor headaches and hair loss that if
> you have functions defined in and outside file name 'foo.php', and in those
> functions you use cookies, you must pass those cookies to the function
> called. I tried using a value from a cookie in a function and it never could
> access it unless I passed it. Funny
> --
> Patrick Hanna
> Database integration--E-commerce solutions
> The Wentworth Company
/* Joe Stump
* Sr. PHP Developer
* http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
*/