setcookie() is one possibility.
Other options are:
Sessions:
use start_session() right at the top of each of your pages.
You can then declare persitent variables with $_SESSION["someName"] = someValue;
You can access these variables on every page as long as the session exists.
Usually, sessions use cookies to maintain state. In case no cookies are available, you might need (depending on your PHP configuration / version) to add "?".SID to every url on your pages.
URL Query Strings:
Simply attach the variable to your urls with the following syntax: yourUrl.php?firstVariable=....&secondVariable=.....
you might also want to read up on things like session, $GET, $POST, $_SESSION etc. on www.php.net
And of course, if you've got a more detailed question, just post it.
Hope this help 😉