Passing variables from page to page (multiple page

Results 1 to 2 of 2

Thread: Passing variables from page to page (multiple page

  1. #1
    Curtis Martin Guest

    Default Passing variables from page to page (multiple page

    Hello everyone,<BR><BR>Please forgive me for the ignorance of this question, but...<BR><BR>I&#039m working on an Employee maintenance site. You select the employee from a SQL generated selectbox and then select a radio button to Inquire, Update or Add a New employee. I was told that I needed to go through an intermediate page to redirect the user to the appropriate page, ie. Inquire, Update or Add. The field select on page 1 is defined as Empid. Empid is seen on the intermediate page, but I can&#039t reference it on the actual Inquire page. I have used both form methods of "post" and "get" and have tried using the response.querystring("Empid") and response.form("EMpid") collections, but the Empid value and defintion is dropped after the second page, therefore I never "see" it on the thrid page to do the actual select of all info from SQL.<BR><BR>Any help would be greatly appreciated.<BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: Passing variables from page to page (multiple

    I hope I understand your problem clearly. I think what you need is a flag variable that indicate wherether you want to save or add a new employee. for example <BR> If your flag = 1 then<BR> Rs.AddNew<BR> .<BR> .<BR> Rs.Update<BR> Else<BR> Rs.Update<BR> Rs("first_name") = Tom<BR> End if<BR><BR>I don&#039t think you would need to separate your Update and Addnew Record page.<BR>or if you want to separate it into two page you can do this<BR>Let say when you are submit your form from the first page<BR>&#060;form action="save.asp" method="post"&#062;<BR> code here<BR>&#060;/form&#062;<BR><BR>The following page is save.asp<BR>&#060;html&#062;<BR> if (request("update check box")is check)<BR> Server.Transfer("update.asp")<BR> End if<BR> &#039&#039 other wise just add a new record after this line<BR> Rs.AddNew and so on<BR>&#060;/html&#062;<BR><BR>I hope I was help.<BR>Duc<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts