Another option is to make use of sessions, which is specifically designed to track persistant data across requests to the same site (you didn't specify if the data had to be passed across multiple domains, or just different pages on the same domain)
http://www.php.net/manual/en/ref.session.php
should get you pointed in the right direction.