Using a Checkbox or Radio Button to pass text to a php script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robind
    New Member
    • Oct 2008
    • 7

    Using a Checkbox or Radio Button to pass text to a php script

    I currently am running a promotional code to get a discount to be given in my oscommerce shopping cart. I have working code when the text is manually entered on the shopping_cart.p hp page.

    Code:
    <?php
    echo '<td class="main">' . tep_draw_separator('pixel_trans.gif', '20', '1') . tep_draw_input_field('promo_code', '', 'size="10"') . tep_draw_separator('pixel_trans.gif', '5', '1') . 'Promotion Code (optional). Update cart to see discount.</td>';
    ?>
    this calls the discount module and applies the discount when you manually enter the text "CLUB". The code for the discount follows...

    Code:
    if (!tep_session_is_registered('promo_code')) {
    tep_session_register('promo_code');
    $promo_code = '';
    } 
    
    include_once(DIR_WS_FUNCTIONS.'easy_discount.php');
    $easy_discount->reset();
    if($promo_code == 'CLUB')
    {
    $easy_discount->add('CCD','Coffee Club Discount',$cart->show_total()*0.1);
    }
    I am attempting to accomplish the same call with a checkbox or radio button. I have made numerous feeble attempts to no avail (more than I like to admit). One of my attempts is here

    Code:
    <input type=checkbox name="promo_code" value="CLUB" onClick="submit();">
    This seems to be close, if I enter "CLUB" in the text box and click the check box it will apply the discount. You're welcome to test this yourself at
    http://www.konacoffee. com/catalog/1lb-extra-fancy-medium-roast.html
    click add to cart and you'll see the text box for the promotional code, enter "CLUB" caps no quotes and you'll see the discount applied.

    Any help and feedback is greatly appreciated.
    Aloha from Kona,
    Robin
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    You don't show how you're retrieving the value of the textbox. Please do.

    Cheers.

    Comment

    • Robind
      New Member
      • Oct 2008
      • 7

      #3
      Originally posted by Markus
      You don't show how you're retrieving the value of the textbox. Please do.

      Cheers.
      Hi Markus,

      Thank you for your help. That may be the problem? Maybe I'm not retrieving the value. The form post for this page is
      <form name="cart_quan tity" action="http://www.konacoffee. com/catalog/shopping_cart_a ction-update_product. html" method="post">

      When I send the information by manually inputting the text you just click "Update" and the same page refreshes with the discount shown. It uses easy_discount.p hp.

      Shown below

      Code:
      <?php
        class easy_discount {
          var $discounts;
      
          function easy_discount () {
            $this->discounts = array();
          }
      
          function reset() {
            $this->discounts = array();
          }
      
          function set($type,$description, $amount) {
           $this->discounts[$type] = array('description' => $description, 'amount' => $amount);
          }
      
          function add($type,$description, $amount) { // obsolete
           $this->discounts[$type] = array('description' => $description, 'amount' => $amount);
          }
      
          function clear($type) {
            if (isset($this->discounts[$type])) unset($this->discounts[$type]);
          }
      
          function remove_type($type) { // obsolete
            if (isset($this->discounts[$type])) unset($this->discounts[$type]);
          }
      
          function count() { 
            return sizeof($this->discounts);
          }
      
          function get($type) { 
            return $this->discounts[$type];
          }
      
          function total() {
            reset($this->discounts);
            $total = 0;
            while (list($type, ) = each($this->discounts)) {
             $total = $total + $this->discounts[$type]['amount'];
            }
            return $total;
          }
      
          function get_all() {
            $discounts_array = array();
            reset($this->discounts);
            while (list($type, ) = each($this->discounts)) {
                $discounts_array[] = array('description' => $this->discounts[$type]['description'],
                                           'amount' => $this->discounts[$type]['amount']);
            }
            return $discounts_array;
          }
        }
      ?>

      Comment

      • Robind
        New Member
        • Oct 2008
        • 7

        #4
        Originally posted by Markus
        You don't show how you're retrieving the value of the textbox. Please do.

        Cheers.

        Hi Markus,
        Is this what you mean by "retrieving the value of the textbox"

        <form name="cart_quan tity" action="http://www.konacoffee. com/catalog/shopping_cart.p hp?action=updat e_product" method="post">

        Currently after you enter text in the text box and click an "update" button. The discount is applied...ie: the current code for manually entering and retrieving the text is here:

        Code:
        <?php
        echo '<td class="main">' . tep_draw_separator('pixel_trans.gif', '20', '1') . tep_draw_input_field('promo_code', '', 'size="10"') . tep_draw_separator('pixel_trans.gif', '5', '1') . 'Promotion Code (optional). Update cart to see discount.</td>';
        ?>
        In the textbox that is made with this code the user can enter "CLUB", click "Update" and the discount is applied. I'm trying to do the same thing without them needing to manually type the text, They click the checkbox, the promo code text -"CLUB" is hidden. When they check the box the "onclick" updates the cart showing the discount.

        Or any other way which would work better?

        I hope that makes more sense.

        I'm thinking I need to add the text to the onClick="submit (); command but I can't seem to properly do that.

        Thank you - any and all who read this and have feedback.

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          No, you show how you pass the form.

          You're passing the form using the method POST. Therefore, you should be retrieving it by $_POST['key_name'], but you haven't shown that part of your code yet.

          Markus.

          Comment

          • Robind
            New Member
            • Oct 2008
            • 7

            #6
            Originally posted by Markus
            No, you show how you pass the form.

            You're passing the form using the method POST. Therefore, you should be retrieving it by $_POST['key_name'], but you haven't shown that part of your code yet.

            Markus.

            Thank You. Yes this where I'm running into the brick wall. Would you be so kind as to show me how to retrieve it? I have tried numerous $_POST variations and
            if (isset($_POST[''])) variations and either get syntax errors or I'm not retrieving the information. All I want to do is make it so my customer doesn't have to manually enter the text "CLUB", they can check the box and by doing so, the text they would of had to manually enter is sent as if they had entered it and the form is processed and the discount would apply.

            Comment

            • Markus
              Recognized Expert Expert
              • Jun 2007
              • 6092

              #7
              If the name of the checkbox is promo_code, then check that it is in the POST array.

              Code:
              if( isset( $_POST['promo_code'] ) )
                  // promo_code was selected
              else
                  // promo_code wasn't selected

              Comment

              • Robind
                New Member
                • Oct 2008
                • 7

                #8
                Originally posted by Markus
                If the name of the checkbox is promo_code, then check that it is in the POST array.

                Code:
                if( isset( $_POST['promo_code'] ) )
                    // promo_code was selected
                else
                    // promo_code wasn't selected
                Thank you Markus....I think I'm getting close but still missing something. (feeling pretty stupid actually) Here is what I have that doesn't work.

                Code:
                Coffee Club:<input type="checkbox" name="promo_code" value="CLUB"  />
                
                <?php
                $promo_code = CLUB;
                if( isset( $_POST['promo_code'] ) )
                {
                $easy_discount->add('CCD','Coffee Club Discount',$cart->show_total()*0.1);
                }
                ?>
                and here is what I have that does work...If you enter the text "CLUB" manually.

                Code:
                <?php
                echo '<td class="main">' . tep_draw_separator('pixel_trans.gif', '20', '1') . tep_draw_input_field('promo_code', '', 'size="10"') . tep_draw_separator('pixel_trans.gif', '5', '1') . 'Promotion Code (optional). Update cart to see discount.</td>';
                
                
                if($promo_code == 'CLUB')
                {
                $easy_discount->add('CCD','Coffee Club Discount',$cart->show_total()*0.1);
                Do you drink coffee? I have some really good coffee....guess I'm much better at coffee than coding. ;-)

                Thank YOU,
                Robin

                Comment

                • Markus
                  Recognized Expert Expert
                  • Jun 2007
                  • 6092

                  #9
                  Nope, that should work fine. Although, CLUB should be in quotes on line 5. What doesn't happen?

                  Can you show me the source of the html form please? Maybe the problem is with that.

                  Comment

                  • Robind
                    New Member
                    • Oct 2008
                    • 7

                    #10
                    Originally posted by Markus
                    Nope, that should work fine. Although, CLUB should be in quotes on line 5. What doesn't happen?

                    Ok...I put the quotes. I expect that when I check the box and click update that the discount will be applied, but it isn't.

                    Can you show me the source of the html form please? Maybe the problem is with that.
                    Here is the source code from shopping_cart.p hp with an item added. There is a lot going on here.

                    Code:
                    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
                    <html dir="LTR" lang="en">
                    <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                    <title>KonaCoffee.com</title>
                    <base href="http://www.konacoffee.com/catalog/">
                    <link rel="stylesheet" type="text/css" href="stylesheet.css">
                    </head>
                    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
                    <!-- header //-->
                    <link rel="Shortcut Icon" href="/favicon.ico" alt="kona coffee">
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr class="header">
                        <td valign="middle"><a href="http://www.konacoffee.com/catalog/index.php"><img src="images/konacoffeebanner.jpg" border="0" alt="KonaCoffee.com" title=" KonaCoffee.com "></a></td>
                    
                                <td width="81%" align=right background="images/beans.gif">
                                
                              <div align="center" class="originalbanner">the Original on-line Kona Coffee Store - Est 1995 </div></td>
                      </tr>
                    </table>
                    <table border="0" width="100%" cellspacing="0" cellpadding="1">
                      <tr class="headerNavigation">
                        <td class="headerNavigation">&nbsp;&nbsp;<a href="http://www.konacoffee.com" class="headerNavigation">Home</a> &raquo; <a href="http://www.konacoffee.com/catalog/index.php" class="headerNavigation">Kona Coffee Store</a> &raquo; <a href="http://www.konacoffee.com/catalog/shopping_cart.php" class="headerNavigation">Cart Contents</a></td>
                    
                        <!-- PWA BOF -->    
                        <td align="right" class="headerNavigation"><a href="http://www.konacoffee.com/catalog/shopping_cart.php" 
                    class="headerNavigation">Cart Contents</a> &nbsp;|&nbsp; <a href="https://www.konacoffee.com/catalog/checkout_shipping.php" class="headerNavigation">Checkout</a> &nbsp;&nbsp;</td>
                        <!-- PWA EOF -->
                      </tr>
                    </table>
                    <!-- header_eof //-->
                    
                    <!-- body //-->
                    
                    <table border="0" width="100%" cellspacing="3" cellpadding="3">
                      <tr>
                        <td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
                    <!-- left_navigation //-->
                    <!-- categories //-->
                              <tr>
                                <td>
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt=""></td>
                    
                        <td width="100%" height="14" class="infoBoxHeading">Categories</td>
                        <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
                      </tr>
                    </table>
                    <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
                      <tr>
                        <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                    
                      </tr>
                      <tr>
                        <td align="left" class="boxText"><a href="http://www.konacoffee.com/catalog/index.php?cPath=21">Kona Coffee-&gt;</a><br></td>
                      </tr>
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                    </table>
                    </td>
                    
                      </tr>
                    </table>
                                </td>
                              </tr>
                    
                    
                    <!-- categories_eof //-->
                    <!-- specials //-->
                              <tr>
                                <td>
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                    
                        <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
                        <td width="100%" height="14" class="infoBoxHeading">Specials</td>
                        <td height="14" class="infoBoxHeading" nowrap><a href="http://www.konacoffee.com/catalog/specials.php"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more "></a><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
                      </tr>
                    </table>
                    <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
                      <tr>
                        <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
                      <tr>
                    
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                      <tr>
                        <td align="center" class="boxText"><a href="http://www.konacoffee.com/catalog/product_info.php?products_id=53"><img src="images/4x6decaf.jpg" border="0" alt="1lb. Decaf Med/Dark Roast - Save $5" title=" 1lb. Decaf Med/Dark Roast - Save $5 " width="50" height="75"></a><br><a href="http://www.konacoffee.com/catalog/product_info.php?products_id=53">1lb. Decaf Med/Dark Roast - Save $5</a><br><s>$34.95</s><br><span class="productSpecialPrice">$29.95</span></td>
                      </tr>
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                    
                      </tr>
                    </table>
                    </td>
                      </tr>
                    </table>
                                </td>
                              </tr>
                    <!-- specials_eof //-->
                    <!-- information //-->
                              <tr>
                                <td>
                    
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
                        <td width="100%" height="14" class="infoBoxHeading">Information</td>
                        <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
                      </tr>
                    </table>
                    <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
                      <tr>
                        <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
                    
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                      <tr>
                        <td class="boxText"><a href="http://www.konacoffee.com/catalog/shipping.php">Shipping & Returns</a><br><a href="http://www.konacoffee.com/catalog/privacy.php">Privacy Notice</a><br><a href="http://www.konacoffee.com/catalog/contact_us.php">Contact Us</a></td>
                      </tr>
                      <tr>
                    
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                    </table>
                    </td>
                      </tr>
                    </table>
                                </td>
                              </tr>
                    <!-- information_eof //-->
                    
                    <!-- left_navigation_eof //-->
                        </table></td>
                    
                    <!-- body_text //-->
                        <td width="100%" valign="top"><form name="cart_quantity" action="http://www.konacoffee.com/catalog/shopping_cart.php?action=update_product" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="0">
                          <tr>
                            <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
                              <tr>
                                <td class="pageHeading">What's In Your Cart?</td>
                                <td class="pageHeading" align="right"><img src="images/table_background_cart.gif" border="0" alt="What's In Your Cart?" title=" What's In Your Cart? " width="50" height="46"></td>
                              </tr>
                            </table></td>
                    
                          </tr>
                          <tr>
                            <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
                          </tr>
                          <tr>
                            <td>
                    <input type="hidden" name="id[28{3}1][3]" value="1"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListing">
                      <tr>
                        <td align="center" class="productListing-heading">Remove</td>
                    
                        <td class="productListing-heading">Product(s)</td>
                        <td align="center" class="productListing-heading">Qty.</td>
                        <td align="right" class="productListing-heading">Total</td>
                      </tr>
                      <tr class="productListing-even">
                        <td align="center" class="productListing-data" valign="top"><input type="checkbox" name="cart_delete[]" value="28{3}1"  onclick='document.cart_quantity.submit();'></td>
                        <td class="productListing-data"><table border="0" cellspacing="2" cellpadding="2">  <tr>    <td class="productListing-data" align="center"><a href="http://www.konacoffee.com/catalog/product_info.php?products_id=28{3}1"><img src="images/4x6medium.jpg" border="0" alt="1lb. Extra Fancy - Medium Roast" title=" 1lb. Extra Fancy - Medium Roast " width="50" height="75"></a></td>    <td class="productListing-data" valign="top"><a href="http://www.konacoffee.com/catalog/product_info.php?products_id=28{3}1"><b>1lb. Extra Fancy - Medium Roast</b></a><br><small><i> - Grind Whole Bean</i></small>    </td>  </tr></table></td>
                    
                        <td align="center" class="productListing-data" valign="top"><input type="text" name="cart_quantity[]" value="1" size="4" onblur="document.cart_quantity.submit();"><input type="hidden" name="products_id[]" value="28{3}1"></td>
                        <td align="right" class="productListing-data" valign="top"><b>$27.95</b></td>
                      </tr>
                    </table>
                            </td>
                          </tr>
                          
                          <tr>
                            <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
                          </tr>
                    
                          <tr>
                            <td align="right" class="main"><b>Sub-Total: $27.95</b></td>
                          
                         </tr>
                       
                      
                    
                          <tr>
                            <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
                          </tr>
                          <tr>
                            <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                    
                              <tr class="infoBoxContents">
                                <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                                  <tr>
                                    <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
                                    <td class="main"></td>
                                    
                    <tr><table border="0" width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                    <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="5"></td>
                    </tr>
                    <tr>
                    Join Coffee Club:<input type="checkbox" name="promo_code" value="CLUB" />
                    
                    
                    <td class="main"><img src="images/pixel_trans.gif" border="0" alt="" width="20" height="1"><input type="text" name="promo_code" size="10"><img src="images/pixel_trans.gif" border="0" alt="" width="5" height="1">Promotion Code (optional). Update cart to see discount.</td></tr>
                    </table></td>
                              </tr>
                            </table></td>
                            
                            <tr>
                    <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="5"></td>
                    </tr>
                            
                    <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
                          </tr>
                    
                          <tr>
                            <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
                              <tr class="infoBoxContents">
                                <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                                  <tr>
                                    <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
                                    <td class="main"></td>
                                    
                    <tr><table border="0" width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                    
                    <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="5"></td>
                    </tr>
                    <tr>               
                                    
                                    <td align="right" class="main"><input type="image" src="includes/languages/english/images/buttons/button_update_cart.gif" border="0" alt="Update Cart" title=" Update Cart ">                
                                    <a href="https://www.konacoffee.com/catalog/checkout_shipping.php"><img src="includes/languages/english/images/buttons/button_checkout.gif" border="0" alt="Checkout" title=" Checkout "></a></td>
                                    <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
                                  </tr>
                                </table></td>
                              </tr>
                            </table></td>
                          </tr>
                    
                        </table></form></td>
                    <!-- body_text_eof //-->
                        <td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
                    <!-- right_navigation //-->
                    <!-- shopping_cart //-->
                              <tr>
                                <td>
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
                    
                        <td width="100%" height="14" class="infoBoxHeading">Shopping Cart</td>
                        <td height="14" class="infoBoxHeading" nowrap><a href="http://www.konacoffee.com/catalog/shopping_cart.php"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more "></a><img src="images/infobox/corner_right.gif" border="0" alt=""></td>
                      </tr>
                    </table>
                    <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
                      <tr>
                        <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                    
                      </tr>
                      <tr>
                        <td class="boxText"><table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td align="right" valign="top" class="infoBoxContents"><span class="infoBoxContents">1&nbsp;x&nbsp;</span></td><td valign="top" class="infoBoxContents"><a href="http://www.konacoffee.com/catalog/product_info.php?products_id=28{3}1"><span class="infoBoxContents">1lb. Extra Fancy - Medium Roast</span></a></td></tr></table></td>
                      </tr>
                      <tr>
                        <td class="boxText"><img src="images/pixel_black.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                    
                      <tr>
                        <td align="right" class="boxText">$27.95</td>
                      </tr>
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                    </table>
                    </td>
                      </tr>
                    
                    </table>
                                </td>
                              </tr>
                    <!-- shopping_cart_eof //-->
                    <!-- Security //-->
                              <tr>
                                <td>
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
                        <td width="100%" height="14" class="infoBoxHeading">Hacker Safe</td>
                    
                        <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
                      </tr>
                    </table>
                    <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
                      <tr>
                        <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                      <tr>
                    
                        <td class="boxText"><a target="_blank" href="https://www.scanalert.com/RatingVerify?ref=konacoffee.com"><img width="115" height="32" border="0" src="//images.scanalert.com/meter/konacoffee.com/22.gif" alt="McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams" oncontextmenu="alert('Copying Prohibited by Law - McAfee Secure is a Trademark of McAfee, Inc.'); return false;"></a><br><br><a target="_blank" href="http://www.echo-inc.com/"><img width="95" height="45" border="0" src="https://www.konacoffee.com//catalog/images/echo_certified_blue.gif" alt="ECHO - Electronic Clearing House - a tier 1 credit card processor" oncontextmenu="alert('Copying Prohibited by Law'); return false;"></a><br></td>
                      </tr>
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                    </table>
                    </td>
                      </tr>
                    </table>
                                </td>
                    
                              </tr>
                    <!-- Security_eof //-->
                    
                    <!-- reviews //-->
                              <tr>
                                <td>
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
                        <td width="100%" height="14" class="infoBoxHeading">Reviews</td>
                    
                        <td height="14" class="infoBoxHeading" nowrap><a href="http://www.konacoffee.com/catalog/reviews.php"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more "></a><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
                      </tr>
                    </table>
                    <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
                      <tr>
                        <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                      <tr>
                    
                        <td class="boxText"><div align="center"><a href="http://www.konacoffee.com/catalog/product_reviews_info.php?products_id=37&reviews_id=36"><img src="images/4x6dark.jpg" border="0" alt="5lb. Extra Fancy - Dark Roast - Save $15" title=" 5lb. Extra Fancy - Dark Roast - Save $15 " width="50" height="75"></a></div><a href="http://www.konacoffee.com/catalog/product_reviews_info.php?products_id=37&reviews_id=36">Great Coffee every time! ..</a><br><div align="center"><img src="images/stars_5.gif" border="0" alt="5 of 5 Stars!" title=" 5 of 5 Stars! "></div></td>
                      </tr>
                      <tr>
                        <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
                      </tr>
                    </table>
                    </td>
                      </tr>
                    </table>
                                </td>
                    
                              </tr>
                    <!-- reviews_eof //-->
                    <tr>
                                        <td class="pageHeading" height="100%" valign="top">
                                        </td>
                                      </tr>
                    <!-- right_navigation_eof //-->
                        </table></td>
                      </tr>
                    </table>
                    <!-- body_eof //-->
                    
                    <!-- footer //-->
                    <table border="0" width="100%" cellspacing="0" cellpadding="1">
                      <tr class="footer">
                        <td class="footer">&nbsp;&nbsp;Wednesday 22 October, 2008&nbsp;&nbsp;</td>
                        <td align="right" class="footer">&nbsp;&nbsp;1592439 requests since Wednesday 22 February, 1995&nbsp;&nbsp;</td>
                      </tr>
                    </table>
                    <br>
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                    
                        <td align="center" class="smallText">Copyright &copy; 2008 <a href="http://www.konacoffee.com/catalog/index.php">KonaCoffee.com</a><br>Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></td>
                      </tr>
                    </table>
                    <!-- footer_eof //-->
                    <br>
                    </body>
                    </html>

                    Comment

                    • Markus
                      Recognized Expert Expert
                      • Jun 2007
                      • 6092

                      #11
                      I was about to give up when I noticed you've named both the checkbox and text input 'promo_code'
                      Name them differently and you'll be cruisin'.

                      Comment

                      • Robind
                        New Member
                        • Oct 2008
                        • 7

                        #12
                        Thank You Markus. It works!!! You da Man!!!

                        I think I had earlier except I left both in so one would cancel the other out. I almost gave up too. I really appreciate your help.
                        Aloha from Kona,
                        Robin

                        On to the next hurdle....

                        Comment

                        • Markus
                          Recognized Expert Expert
                          • Jun 2007
                          • 6092

                          #13
                          Originally posted by Robind
                          Thank You Markus. It works!!! You da Man!!!

                          I think I had earlier except I left both in so one would cancel the other out. I almost gave up too. I really appreciate your help.
                          Aloha from Kona,
                          Robin

                          On to the next hurdle....
                          I am da man, ain't I.

                          See you at the next hurdle.

                          Comment

                          Working...