To pass variables from one page to another you encode the variables in the URL or add to the form information to be submitted (as these two ways are basically how you
get from one page to another).
For example, a link on the first page
Code:
<a href="second.php?x=123&y=abc">Go to the second page</a>
will open the second page which will have access to (global) variables $x and $y.
If you submit a form then all its variables are accessible to the second script, for example
Code:
<form action="second.php" method="POST">
<input type="text" name="x" />
<input type="hidden" name="y" value="abc" />
<input type="submit" name="submit" value="Submit!">
</form>
will get the user input to the second script in variable $x and "abc" in variable $y.
Other ways to (more permanently) store user data would be to store it in cookies, session variables or data base.