Posted by Jerry Stuckle on 05/22/06 17:00
Barkster wrote:
> I have a page that has two functions on it, on load I check for posted
> value if exists I set some variables that I want to use in the
> functions but don't want to pass back and forth. Do I need to be using
> global variables in order to use this variable in each function? Are
> global variables only available to the page they are called correct?
> Never used them before but I'm not getting the values if I just set a
> $var at the top of the page. Thanks
>
Global variables are like any other variables - only available in that page.
Rather than define them as global, however, you should pass them as parameters
to the functions where they are required.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|