Is it possible to have true global variables in PHP? The tests I have done so far seem to suggest that you can have a global variable that is global only to the php file that declares it and not to your whole website. Once you go to another php file, the variable seems to loose what you assign it.
duliduli556
0
Newbie Poster
Recommended Answers
Jump to PostUse sessions or cookies or a db or a textfile or url or forms to pass data. Webpages are stateless, so no you don't get data from one page to another via 'normal' vars.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.