Solved

Saving Form Data when Leaving Page

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

22 Experts available now in Live!

Get 1:1 Help Now