Solved

Saving Form Data when Leaving Page

Posted on 2014-03-04
3
361 Views
Last Modified: 2016-03-24
Hopefully, I can explain this question clearly. I have a membership form (yes, same old membership form) that allows the applicant to specify a membership type, buy a few different items and make donation(s). After making the selection(s), there is an option to "Add to Cart" or go directly to PayPal for payment. If "Add to Cart" is select the selection(s) are stored in a PayPal form and a second membership with the optional selection may be made. Up to 5 memberships are allowed. This process has been working for some years. We are now updating our process to handle renewals. The applicant's information is retrieved from an Access database.

My quandary is that the organization wants the form to work for up to 5 renewals as it always has for memberships. In order to handle the renewal, I'm creating a master selection list based on last name. The associated member ID is used to retrieve the applicant's renewal information. If I process one membership, save the data, display a last name member list for the next renewal, I, of course, lose the saved membership information. Is there a solution for this?

I've considered trying to display the last name selection list on the membership form, but have not figured out how to do this yet.  It appears it might work if I could do a "Back" but I don't see a way to click on the selected name and accomplish a "Back."

Here is the list link that is clicked on:

              <td height="40" align="center" class="links"><a href="membershipAssign2.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "memberID=" & rsMembers.Fields.Item("memberID").Value %>"><%=(rsMembers.Fields.Item("memberID").Value)%></a></td>
0
Comment
Question by:slegy
  • 2
3 Comments
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 350 total points
ID: 39905449
I forgot what you mean by a membership.  Is that one person for 5 years?  Or one person, 5 boats for one year?

I would set up my tables like this:

Contacts {
   ID
   FamilyID (Make a new contact from the same family)
   Name
   Address
   Email
   Phone
}

Boats {
   BoatID
   ContactID (or FamilyID)
   Boat_info
}

Products{
   ID
   Name (2014 Master membership, Donations,book)
   Type  (Membership, books)
   Price
}

Membership{
   ID
   ContactID
   StartDate
   EndDate
   Status
}
MembershipTrans{
  Multiple transactions to one membership  
   ID
   MemberhsipID
   ProductID
   AmountCharged
   Discount
}
MembershipContacts{
List of people covered under membership
   ID
   MembershipID
   ContactID
}
MembershipBoats{
List of boats covered under membership
   ID
   MembershipID
   BoatID
}
Payments{
   ID
   Amount
   PaymentType
   ApplyToMembershipID
}

The membership/member trans is basically a sales order/sales transaction.  Payments get applied to the salesorder/membership.

When it comes to renewal, you can either think in terms of 1 membership per year or a start and end date and allow for 2,3,4,5 or 10 years.  If you want to keep one membership per year and allow purchasing of 5 memberships, you would just loop through 5 times. You would need to create a new membership ID first and use that in each loop.
0
 

Author Comment

by:slegy
ID: 39917609
I may have again worded my question unclearly. The membership processing and the table structures are working as designed. The next enhancement we want to make is the allow up to 5 annual memberships to be entered prior to handing them in bulk to PayPal (as new membership currently works). That involves leaving the membership form and doing name lookup, meaning information entered needs to be saved. I'm currently testing with session variables and it appears that this will work as needed. Thank you for your thoughtful attention to this question.
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 350 total points
ID: 39917795
I think what I am getting at is  part of the solution is the set up.  There are no right or wrong answers and many ways to get to a similar outcome.

Since sessions can break an alternative is write the data to the db, mark it not paid.  Then when paypal hits your return url, update the db and mark it paid/add a payment.  One potential problem with storing a session is you are relying on the purchaser to still be there.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Bypass cross origin issues on development site 3 95
Cannot open file from ASP if user is "logged in" 13 32
Asp in script 6 46
ASP get fieds value 2 20
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 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