Yeah, I had thought about using hidden inputs, but hidden inputs are not 
really hidden. They still exist on the HTML page, and although not visible 
in the browser, are visible in the code. This may not be cool if you have 
sensitive information that is passed, also if you have a lot of variables to 
pass, thats just a lot of hidden inputs to pass.
Is there no other way to accomplish this? No built in function? I guess it 
makes sense that there is not, b/c the form submits the form and only the 
form variables. Thanks.
-Tim


----Original Message Follows----
From: David Robley <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "Tim Olsen" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: [PHP] passing variables from forms to the same page 
repetatively
Date: Tue, 17 Jul 2001 16:13:41 +0930

On Tue, 17 Jul 2001 15:41, Tim Olsen wrote:
 > People,
 > I have 4 forms in four seperate html pages included directly (no links
 > to includes) in the same .php file, i have it so all the form actions
 > is php.self, so when each form is submitted it goes on to display the
 > next form in line, using if and else statements, of course. I want to
 > be able to use variables created by the first form in the html part of
 > the last form. What is the best way to do this?
 >
 > So far, I can only use variables on the next page (form) that is
 > written out. After that those variables have no value.  Is there some
 > way to submit all variables present and assigned with the submission of
 > each form?  If I make the forms a seperate include file, instead of
 > having them in-line, how does this change the ways variables are passed
 > or submitted by each form? Thanks, - Tim
 > _________________________________________________________________


If I understand what you are saying: those variables don't exist until
you SUBMIT the form. You can demonstrate this by looping through and
displaying your POST or GET vars at the beginning of the form and see
what happens when you first open the page, and when it calls itself.

And re-reading, I think what you may want is hidden fields. You want part
one to call part 2, and retain values from part 1, etc? Echo the values
into hidden fields in each step of the process.

<INPUT TYPE=hidden NAME=whatever VALUE="<?php echo $whatever ?>">

--
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA

    I always lie. In fact, I'm lying to you right now!

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to