Solved

How do i keep my form variables.

Posted on 2004-08-04
4
206 Views
Last Modified: 2013-12-24
Hi

I have a form and and action page.  In the action page,

1.  i have a query to check if the record exist - this works well
2.  I have another query that if it doesn't exist, insert it - this works well too.

So the pages in this process are:

>>Form page
>>ActionPage1 (also includes a little form that has CANCEL and ADD ANYWAY Buttons)
>>ActionPage2 (to process the ADD ANYWAY)

Now, I also have another button that says "ADD ANYWAY".  I created another Action Page (which is now ActionPage2  to process the "Add ANYway"  but I lost the Form variables already because I came from an action page.  How do i keep my form variables from "Form Page" to the "ActionPage2"

Thanks

0
Comment
Question by:mdbbound
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
dutchfoxer earned 250 total points
ID: 11722285
This you could solve with HTML form hidden fields. In the CFM file where asked to Add-anyway.... there you write as hidden fields the values from the previous form. Something like this:

<form action="ActionPage2.cfm" method="post" name="addanyway">
  <cfoutput>
     <input type=hidden name="name" value="#form.name#">
     <input type=hidden name="city" value="#form.city#">
<p>Are you sure you want to insert #form.name# ?</p>
</output>
<input type="submit" name="Submit" value="Update">
</form>


This way the values name and city are pasted to script/file "ActionPage2.cfm"

Is this what you meant?
0
 
LVL 17

Assisted Solution

by:anandkp
anandkp earned 250 total points
ID: 11723293
Well looks like u want to carry ur form variables from "Form Page" to "ActionPage1" to "ActionPage2" - RIGHT ?

U cld use Hiddenfields - as mentioned above - or u cld set them up in session/cookies - so u dont need to submit them again & bother abt it .... its upto u to decide how u wanna set it up. [having them in sessions/cookies - avoids the over heads of submitting again + maintaining it with care incase u go back & forth with the forms ...]

K'Rgds
Anand
0
 

Author Comment

by:mdbbound
ID: 11723486
Thanks to both of you.  I tried to read something about hidden fields and I'm just beginning to realized the power of hidden fields.

Thanks again

Anandkp, thanks for being there always ready to support new struggling developers like me.
0
 
LVL 17

Expert Comment

by:anandkp
ID: 11723825
:)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Server specifications for web hosting 7 96
question about access to website 2 93
Stream live video from Raspberry Pi camera 22 326
Public IP Address Amazon Servers 2 68
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question