On 8/5/2005, "Nick Vettese" <[EMAIL PROTECTED]> wrote:

>
>
>
>I am currently working on my site, and I have three
forms for people to fill out, but I would rather have
them fill out the forms in one shot.

The problem is that when the final page comes, and
they hit the submit button, it only emails the last
page.

I am not using a DB at this time (that will be next
step) but my options are always open.

Also, a bonus quesiton...  If I want to add an upload
for pics, can I use the same form type for both text
and pics?

Thanks,
Nick
>
>

Nick - Not 100% certain I understand your question. I believe what
you're saying is you have 3 pages, and each page has a form.
Ultimately, you'd like the final form submit to generate an email
containing values from all 3 forms. This is not the same as having a
single form.

I don't know of any way for a single form (the html <form></form>
construct) to span pages. On page can have many forms, but no form can
physically span pages.

What you can do is pass values from one page to the next. Since you said
you're not using a database, I would recommend either POST or SESSION
(my personal preference is SESSION, although for a first project I'd
recommend POST).

So, page 1 contains form 1. The action for the submit button of form1 is
to lauch page 2. Likewise, P2 contains F2... submitting F2 launches P3.
P3 contains F3... submitting F3 launches a the process to construct and
send your email.

At the start of page 2, you'll need to retrieve the values set in form
1. If you named one of the form's fields "myName" you would retrieve
thus:
$myName = $_POST['myName'];

To pass $myName on to the third page, you must either include a hidden
field within form 2 that contains the value:

<input type="hidden" name="myName" value=<?php print('"' . $myName
. '"'); ?>>

Repeat the process on page 3 - retrieve all the values from form 2
(including the hidden field values), and "hide" them in form 3.

When you submit form 3, all the accumulated values will be in the $_POST
array.

Hope that helps,

Mike


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hcqcl89/M=362329.6886308.7839368.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123269749/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to