Can any one of you guys help me with getting all the variables from one page and storing them in a global file
The global file is used as a include file on all my pages.
I am new to php and do not know much about it so any help will be greatly appreciated.
Thanks in advance
Get all variables and store them in a global file for NEWBIE
Moderator: General Moderators
I'm not sure if you can just get all declared variables - you need to reference each one in particular.
Further, I would strongly recommend using a cookie or a session to store any variables you need, rather than storing them in a file. Handling cookies and sessions will also have quite a bit less overhead.
You can store stuff in a cookie simply by calling setcookie().
Further, I would strongly recommend using a cookie or a session to store any variables you need, rather than storing them in a file. Handling cookies and sessions will also have quite a bit less overhead.
You can store stuff in a cookie simply by calling setcookie().
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.