Having 2 forms/ Storing form data onto sessions?

I am trying to find a way to have two forms on the same page. However
when I hit the submit button on one form the data that had been
entered on the other form disappears. Is there a way to transfer the
data on a form perhaps onto sessions? I tried having one form wrap
onto another but it got messy and would not work.

An example is where there are two forms one to submit a message and
one to upload files. Suppose I would start writing a message on the
first form and then I upload a file using a second form. After
uploading the file the message of the text area field would
disappear.

Any ideas?

Thanks.

-Richard

  1. nesting tags is invalid HTML and will never work

  2. only thing i can think of to solve this is using AJAX to submit the
    form.