Advertisement

06.09.2008 at 07:33AM PDT, ID: 23469158
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.1

Passing parameters/defining session variables

Asked by bogorman in Payment Processing Recommendation and Integrating, E-Commerce, Stores & Carts

I have a webpage called SummerBook.htm:

<form action="http://www.faith.org.uk/events/formmail.php" method="post" name="SumSessBkngForm" class="style4" id="SumSessBkngForm" onSubmit="MM_validateForm('name','','R','Address 1','','R','Town','','R','Date of Birth','','R','email','','R');return document.MM_returnValue">
                <table width="95%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="7" class="formlabels">&nbsp;</td>
                    <td width="94" class="formlabels">Name</td>
                    <td colspan="8"><input name="Name" type="text" onKeyPress="return handleEnter(this, event)" class="formelement" id="name" size="55"></td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">Address 1 </td>
                    <td colspan="8"><input name="Address 1" type="text" onKeyPress="return handleEnter(this, event)" class="formelement" id="Address 1"></td>
                  </tr>
                  <tr>
                    <td class="formlabels style5">&nbsp;</td>
                    <td class="formlabels">Address 2 </td>
                    <td colspan="8"><input name="Address 2" type="text" onKeyPress="return handleEnter(this, event)" class="formelement" id="Address 2"></td>
                  </tr>
                  <tr>
                    <td class="formlabels style5">&nbsp;</td>
                    <td class="formlabels">Town</td>
                    <td colspan="4"><input name="Town" type="text" onKeyPress="return handleEnter(this, event)" class="formelementShort" id="Town"></td>
                    <td width="83" class="formlabels">County</td>
                    <td colspan="2"><input name="County" type="text" onKeyPress="return handleEnter(this, event)" class="formelementShort" id="County"></td>
                  </tr>
                  <tr>
                    <td class="formlabels style5">&nbsp;</td>
                    <td class="formlabels">Post Code </td>
                    <td colspan="4"><input name="Postcode" type="text" onKeyPress="return handleEnter(this, event)" class="formelementShort" id="Postcode"></td>
                    <td class="formlabels">Telephone</td>
                    <td colspan="2"><input name="Telephone" type="text" onKeyPress="return handleEnter(this, event)" class="formelementShort" id="Telephone"></td>
                  </tr>
                  <tr>
                    <td class="formlabels style5">&nbsp;</td>
                    <td class="formlabels">Date
      of Birth </td>
                    <td colspan="8"><input name="Date of Birth" type="text" class="formelementShort" id="Date of Birth" onBlur="YY_checkform('SumSessBkngForm','Date of Birth','^\([0-9][0-9]\)\/\([0-9][0-9]\)\/\([0-9]{4}\)$#1#2#3','3','Date Of Birth must be in the form DD/MM/YYYY');return document.MM_returnValue" onKeyPress="return handleEnter(this, event)"></td>
                  </tr>
                  <tr>
                    <td class="formlabels style5">&nbsp;</td>
                    <td class="formlabels">Email
      Address </td>
                    <td colspan="8"><input name="email" type="text" onKeyPress="return handleEnter(this, event)" class="formelement" id="email"></td>
                  </tr>
                 
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">Are you</td>
                    <td colspan="8"><table width="76%"  border="0" cellspacing="0" cellpadding="2">
                      <tr>
                        <td width="45%">
                          <input name="Employment" type="radio" onKeyPress="return handleEnter(this, event)" value="School">
                          <strong>At School</strong> </td>
                        <td width="55%" align="left" valign="top">
                          <input name="Employment" type="radio" onKeyPress="return handleEnter(this, event)" value="College">
                          <strong> At College</strong></td>
                      </tr>
                      <tr>
                        <td>
                          <input name="Employment" type="radio" onKeyPress="return handleEnter(this, event)" value="University">
                          <strong> At University </strong></td>
                        <td align="left" valign="top">
                          <input name="Employment" type="radio" onKeyPress="return handleEnter(this, event)" value="Seminary">
                          <strong> At Seminary</strong></td>
                      </tr>
                      <tr>
                        <td>
                          <input name="Employment" type="radio" onKeyPress="return handleEnter(this, event)" value="Priest">
                          <strong>A Priest</strong> </td>
                        <td align="left" valign="top">
                          <input name="employment" type="radio" onKeyPress="return handleEnter(this, event)" value="Religious">
                          <strong>A Religious</strong></td>
                      </tr>
                      <tr>
                        <td>
                          <input name="Employment" type="radio" onKeyPress="return handleEnter(this, event)" value="Working">
                          <strong>Working</strong></td>
                        <td align="left" valign="top">
                          <input name="Employment" type="radio" onKeyPress="return handleEnter(this, event)" value="Unemployed">
                          <strong>Unemployed</strong></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">Is this your first <br>Faith conference? </td>
                    <td colspan="8">
                              <input name="First Faith Conference?" type="radio" onKeyPress="return handleEnter(this, event)" value="Yes">
      Yes
        <input name="First Faith Conference?" type="radio" onKeyPress="return handleEnter(this, event)" value="No">
      No</td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">Are you attending<br>
      as part of a group? </td>
                    <td colspan="8"><input name="Part of Group?" type="radio" onKeyPress="return handleEnter(this, event)" value="Yes">
      Yes
        <input name="Part of Group" type="radio" onKeyPress="return handleEnter(this, event)" value="No">
      No</td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">If YES, please say who is leading the group. </td>
                    <td colspan="8"><input name="Group Leader" type="text" onKeyPress="return handleEnter(this, event)" id="groupleader" size="55"></td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">Do you have any<br>
      dietary requirements? </td>
                    <td colspan="8"><input name="Dietary Requirements?" type="radio" onKeyPress="return handleEnter(this, event)" value="Yes">
      Yes
        <input name="dietaryrequirements" type="radio" onKeyPress="return handleEnter(this, event)" value="No">
      No</td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">If YES, <br>
      please specify</td>
                    <td colspan="8"><input name="Dietary Details" type="text" onKeyPress="return handleEnter(this, event)" class="formelement" id="dietarydetails"></td>
                  </tr>
                  <tr>
                    <td height="178" class="formlabels">&nbsp;</td>
                    <td class="formlabels">Any comments </td>
                    <td colspan="8"><textarea name="Comments" class="formelement" rows=10 cols=1></textarea></td>
                  </tr>
                  <tr>
                    <td height="54" class="formlabels">&nbsp;</td>
                    <td class="formlabels">                    
                    <div align="center">
                      <input name="coaches" id="NoCoach" onclick="setButtons(this)" type="radio" value="No Coach" checked>
                    </div>
                    </label></td>
                    <td colspan="8"><strong>I DO NOT wish to book a place on a coach </strong></td>
                  </tr>
                  <tr>
                    <td height="54" class="formlabels">&nbsp;</td>
                    <td class="formlabels">                      <label>
                    <div align="center">
                      <input name="coaches" id="EdinburghCoach"  onclick="setButtons(this)" type="radio" value="Edinburgh Coach">
                    </div>
                    </label></td>
                    <td colspan="8">Please book me a place on the<strong> Edinburgh coach </strong>(Holy Cross Church, 11 Bangholm Loan) leaving at 6 a.m. on Monday 4th August 2008<br>
  (cost &pound; 25 waged, &pound; 20 unwaged). Return Friday 8th August </td>
                  </tr>
                  <tr>
                    <td height="21" class="formlabels">&nbsp;</td>
                    <td class="formlabels">&nbsp;</td>
                    <td width="66">Return:
                    <label></label></td>
                    <td width="20"><label>
                      <input name="EdinburghReturn" type="radio" value="EdinburghReturnEdinburgh" disabled>
                    </label></td>
                    <td width="84">E<strong>dinburgh</strong></td>
                    <td width="20"><label>
                      <input name="EdinburghReturn" type="radio" value="EdinburghReturnGlasgow" disabled>
                    </label></td>
                    <td><strong>Glasgow</strong></td>
                    <td width="22"><label>
                      <input name="EdinburghReturn" type="radio" value="EdinburghReturnPreston" disabled>
                    </label></td>
                    <td width="111" colspan="2"><strong>Preston</strong></td>
                  </tr>
                  <tr>
                    <td height="21" class="formlabels">&nbsp;</td>
                    <td class="formlabels">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="51" class="formlabels">&nbsp;</td>
                    <td class="formlabels">                      <label>
                    <div align="center">
                      <input name="coaches" id="GlasgowCoach"  onclick="setButtons(this)" type="radio" value="Glasgow Coach">
                    </div>
                    </label></td>
                    <td colspan="8">Please book me a place on the <strong>Glasgow coach</strong> (George Square) leaving at 7 a.m. on Monday 4th August 2008<br>
  (cost &pound; 25 waged, &pound; 20 unwaged). Return Friday 8th August</td>
                  </tr>
                  <tr>
                    <td height="21" class="formlabels">&nbsp;</td>
                    <td class="formlabels">&nbsp;</td>
                    <td> Return:
                    <label></label></td>
                    <td><label>
                      <input name="GlasgowReturn" type="radio" value="GlasgowReturnGlasgow" disabled>
                    </label></td>
                    <td><strong>Glasgow</strong></td>
                    <td><label>
                      <input name="GlasgowReturn" type="radio" value="GlasgowReturnEdinburgh" disabled>
                    </label></td>
                    <td><strong>Edinburgh</strong></td>
                    <td><label>
                      <input name="GlasgowReturn" type="radio" value="GlasgowReturnPreston" disabled>
                    </label></td>
                    <td colspan="2"><strong>Preston</strong></td>
                  </tr>
                  <tr>
                    <td height="21" class="formlabels">&nbsp;</td>
                    <td class="formlabels">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="49" class="formlabels">&nbsp;</td>
                    <td class="formlabels">                      <label>
                    <div align="center">
                      <input name="coaches" id="PrestonCoach"  onclick="setButtons(this)" type="radio" value="Preston Coach">
                    </div>
                    </label></td>
                    <td colspan="8">Please book me a place on the<strong> Preston coach</strong> (Tickled Trout Services, Junction 31, M6) leaving at 10 a.m. on Monday 4th August 2008
(cost &pound; 20 waged, &pound; 15 unwaged). Return Friday 8th August</td>
                  </tr>
                  <tr>
                    <td height="22" class="formlabels">&nbsp;</td>
                    <td class="formlabels">&nbsp;</td>
                    <td>Return: </td>
                    <td><label>
                      <input name="PrestonReturn" type="radio" value="PrestonReturnPreston" disabled>
                    </label></td>
                    <td><strong>Preston</strong></td>
                    <td><label>
                      <input name="PrestonReturn" type="radio" value="PrestonReturnEdinburgh" disabled>
                    </label></td>
                    <td><strong>Edinburgh</strong></td>
                    <td><label>
                      <input name="PrestonReturn" type="radio" value="PrestonReturnGlasgow" disabled>
                    </label></td>
                    <td colspan="2"><strong>Glasgow</strong></td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">&nbsp;</td>
                    <td colspan="4" align="right">&nbsp;</td>
                    <td align="right">&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="formlabels">&nbsp;</td>
                    <td class="formlabels">&nbsp;</td>
                    <td colspan="4" align="right"><div align="left">
                      <input name="submit" type=submit value="Book now">
                    </div></td>
                    <td align="right"><input name="reset" type=reset value="Clear form"></td>
                    <td colspan="2">&nbsp;</td>
                  </tr>
                </table>
                                                                                     
                <input type=hidden name="recipient" value="Conf123">
                <input type=hidden name="subject" value="2008 Summer Session Booking Form">
                <input type=hidden name="redirect" value="SummerThanks.html">
      </form>

Its action is set to open formmail.php which sends an email with the form data to the recipient. This works fine.

I also want to open another page afterwards which enables the user to either pay by Paypal, or pay by cheque.   The Paypal payment amount is calculated from the radio buttons:


If "Working"    £ 125
Otherwise:    £ 105

To which we have to add cost of coach:

No charge if "I do not wish to book...."
Otherwise:
If Edinburgh or Glasgow:
If "Working" : £ 25
Otherwise  : £ 20

Otherwise:
If Preston:
If "Working" : £ 20
Otherwise  : £ 15

What I would like to do is to either pass this (as a session variable?) so that, after the formmail page is opened and the email is sent, the user is taken to another page where the data is displayed as:

Summer Session Cost:    £ xxxx
Coach Cost                 :    £ xxxx
Total due                    :     £ xxxx


I have another page on the site:

It has this:

<SCRIPT SRC="language-en.js" type="text/javascript"></SCRIPT>
<SCRIPT SRC="Paypalnopcart.js" type="text/javascript">
  //=====================================================================||
  //               NOP Design JavaScript Shopping Cart                   ||
  //                                                                     ||
  // For more information on SmartSystems, or how NOPDesign can help you ||
  // Please visit us on the WWW at http://www.nopdesign.com              ||
  //                                                                     ||
  // JavaScript Shop Module, V.4.4.0                                     ||
  //=====================================================================||
</SCRIPT>
<script type="text/javascript">

And a form:

<form name="form1" ACTION="PaypalManageCart.html" onSubmit="AddToCart(this);">
            <table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td><img src="PamphletSpacerLower.gif" alt="" width="10" height="10" align="left">Quantity</td>
                <td>&nbsp;</td>
                <td><input name="QUANTITY" type="text" size="2" maxlength="3" onChange=       'this.value=CKquantity(this.value)' value="1"></td>
                <td><img src="PamphletSpacerLower.gif" alt="" width="10" height="10" align="left">
                  <input name="image2" type="image" value="Add to Cart" src="BuyNowUp.gif" alt="Buy Now button"  ></td><td><input type="hidden" name="PRICE" value="1.00"></td>
                <td><input type="hidden" name="NAME" value="Christ our Eucharist"></td>
                <td><input type="hidden" name="ID_NUM" value="P4"></td>
                <td><input type="hidden" name="SHIPPING" value="0.10"></td>
              </tr>
            </table>
            </form>

How can I pass the booking parameters to the PaypalManageCart.html page so that the details are displayed on it and the user can then click on a "buy now" button (which is on the page" which will take them to Paypal?



Start Free Trial
 
 
[+][-]06.09.2008 at 07:57AM PDT, ID: 21743658

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 07:57AM PDT, ID: 21743665

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 09:40AM PDT, ID: 21744560

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 02:09AM PDT, ID: 21758021

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 07:44AM PDT, ID: 21760572

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Payment Processing Recommendation and Integrating, E-Commerce, Stores & Carts
Sign Up Now!
Solution Provided By: devarioj
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.12.2008 at 02:14AM PDT, ID: 21767419

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 02:45AM PDT, ID: 21837011

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 03:16AM PDT, ID: 21914828

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 02:37AM PDT, ID: 21943618

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628