how can ia declare a variable p in one page and use it in another page but not by post method?
I suggest using cookies for this.
Include this in the page where the variable is set:
setcookie ("global_var", "some_value");
To retrieve the variable in another page, simply adress the cookie by its name, in this case: $global_var
Ah, forgot to tell you - it's very important that the setcookie() is called before any output is sent to the browser, that means you must put it before the head-tag.