Solved

Saving Form Data when Leaving Page

Posted on 2014-03-04
3
354 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now