in reply to global variable between scripts

Rather than a global variable, I think what you want is a value which persists but which may be differ between users. Since HTTP is a stateless protocol, you will need to maintain the state (or a pointer to it) on the client side. Generally that's done with cookies. Hidden form elements can sometimes be useful as well but only if you are already dynamically generating the form content.

-sauoq
"My two cents aren't worth a dime.";