Well, no.
One of the first things to learn about http is that it doesn't remember anything from one request to the next, whether it be for a page, or image, or whatever; they're completely separate events and the server doesn't bother to keep track of who is requesting what (that's far too much work). When a PHP script finishes running, it shuts down and all the variables it contains are deleted and the memory containing them freed back up to deal with the next request.
If you want something to be remembered from one request to the next, it has to be saved somewhere. And, since the server doesn't keep track of who is requesting what, it's up to the client to identify itself when it makes its request.
PHP comes with a function and an array that together achieve this. The function is session_start(). Put that at the start of each script that deals with anything that needs remembering during a session.
The array is $_SESSION. After calling session_start(), you can put stuff in this array and get it out again just as you would for any other array.
See the manual for details and elaborations, or search this forum.