You've got a slightly wrong idea of session. Actually, it's probably a lot easier than you think 😉
first, insert the following code into any page that uses the session information (right at the top would be best)
<?php
session_start();
?>
Well, that's it: On any page you wish, you can now store and access session variables. This, depending on your PHP version, can be done in three ways. Here the most current way:
whenever you need a session variable, declare (or access) it with
$_SESSION[theNameasString] = somevalue;
you don't need to upload any files or sth like that for it to work.
There might be some problems when your clients have disabled cookies, but you can read up more specific information at www.php.net ;
About the scenario you outlined: In case the page with form2 is called by the submit action of page1 (i.e. there are no intermediate pages) you won't even need sessions.
All variables that were in the form are available as either $POST[varname] or $GET[varname], depending on submission method (get or post).
Hope this helps
<Gernot>
Edited for the above post:
You should not use $HTTP_POST_VARS. If you're currently using an older PHP version that doesn't support $_POST use the following line to be ready for the future:
$POST = isset($POST) ? $_POST : $HTTP_POST_VARS;