Hi Guys -
I'm trying to setup an events registration form. I've got everything done (selecting the event from the list, reading about the event, entering how many people are going to be attending, filling out the form, adding that info to a database, and emailing the coordinator). Here's my problem: I want to set up a shopping cart kind of system so that the user can enter how many people are going to attend an event, and then go back and enter more events to their 'cart', before entering their info and checking out. Standard shopping cart stuff right? I have been playing around with session variables... here is what I have been doing:
<!-- form to enter how many people they are registering for the event on this page -->
<FORM ACTION="registration.cfm?ID=#ID#" METHOD="Post">
<INPUT TYPE="hidden" NAME="event" VALUE="#event#">
<INPUT TYPE="hidden" NAME="price_member" VALUE="#price_member#">
<INPUT TYPE="hidden" NAME="price_nonmember" VALUE="#price_nonmember#">
<table border="1" bordercolor="003366" cellpadding="3" cellspacing="0">
<TR><TD colspan=2 bgcolor="003366"><p class="white"><b>Register for this Event</b></p></td></tr>
<TR><TD><p>Number of Members</p></td><TD><INPUT TYPE="text" SIZE=2 NAME="members"></td></tr>
<TR><TD><p>Number of Non-Members</p></td><TD><INPUT TYPE="text" SIZE=2 NAME="nonmembers"></td></tr>
<TR><TD colspan=2><INPUT TYPE="submit" VALUE="Register!"></td></tr></table>
</form>
Next I have the registration.cfm page which sets the following variables:
<cfset session.event=#form.event#>
<cfset session.price_member=#form.price_member#>
<cfset session.event=#form.price_nonmember#>
But if I try to add more events, they just write themselves over top of the exising session variables! How do I add more and more event registrations, and then how do I display them on the checkout page? I hope I make sense
I'm trying to setup an events registration form. I've got everything done (selecting the event from the list, reading about the event, entering how many people are going to be attending, filling out the form, adding that info to a database, and emailing the coordinator). Here's my problem: I want to set up a shopping cart kind of system so that the user can enter how many people are going to attend an event, and then go back and enter more events to their 'cart', before entering their info and checking out. Standard shopping cart stuff right? I have been playing around with session variables... here is what I have been doing:
<!-- form to enter how many people they are registering for the event on this page -->
<FORM ACTION="registration.cfm?ID=#ID#" METHOD="Post">
<INPUT TYPE="hidden" NAME="event" VALUE="#event#">
<INPUT TYPE="hidden" NAME="price_member" VALUE="#price_member#">
<INPUT TYPE="hidden" NAME="price_nonmember" VALUE="#price_nonmember#">
<table border="1" bordercolor="003366" cellpadding="3" cellspacing="0">
<TR><TD colspan=2 bgcolor="003366"><p class="white"><b>Register for this Event</b></p></td></tr>
<TR><TD><p>Number of Members</p></td><TD><INPUT TYPE="text" SIZE=2 NAME="members"></td></tr>
<TR><TD><p>Number of Non-Members</p></td><TD><INPUT TYPE="text" SIZE=2 NAME="nonmembers"></td></tr>
<TR><TD colspan=2><INPUT TYPE="submit" VALUE="Register!"></td></tr></table>
</form>
Next I have the registration.cfm page which sets the following variables:
<cfset session.event=#form.event#>
<cfset session.price_member=#form.price_member#>
<cfset session.event=#form.price_nonmember#>
But if I try to add more events, they just write themselves over top of the exising session variables! How do I add more and more event registrations, and then how do I display them on the checkout page? I hope I make sense