badalpatel
asked on
Define Global variables in PHP
Hi,
I am completely new in PHP.
And want to create the global variable for my web application scripts that can be accessed anywhere in web application.
It should have less overhead in terms of memory
I am completely new in PHP.
And want to create the global variable for my web application scripts that can be accessed anywhere in web application.
It should have less overhead in terms of memory
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Let me also echo bportlock's wise advice about good coding practices. PHP5 has a fairly useful OOP structure. However as I try to read between the lines of the question, I am thinking that the question is about passing data from page to page of the same web site. The session handler is a good place to start learning about how to do this. After that, learning about cookies and data bases would probably be a good next step.
http://us.php.net/manual/en/ref.session.php
Best of luck with your project, and please post back if you have any specific questions. ~Ray
http://us.php.net/manual/en/ref.session.php
Best of luck with your project, and please post back if you have any specific questions. ~Ray
http://www.sitepoint.com/books/phpmysql4/
Best regards, ~Ray