By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

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

P: 7
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.php page.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3. 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>';
  4. ?>
  5.  
this calls the discount module and applies the discount when you manually enter the text "CLUB". The code for the discount follows...

Expand|Select|Wrap|Line Numbers
  1.  
  2. if (!tep_session_is_registered('promo_code')) {
  3. tep_session_register('promo_code');
  4. $promo_code = '';
  5.  
  6. include_once(DIR_WS_FUNCTIONS.'easy_discount.php');
  7. $easy_discount->reset();
  8. if($promo_code == 'CLUB')
  9. {
  10. $easy_discount->add('CCD','Coffee Club Discount',$cart->show_total()*0.1);
  11. }
  12.  
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

Expand|Select|Wrap|Line Numbers
  1. <input type=checkbox name="promo_code" value="CLUB" onClick="submit();">
  2.  
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
Oct 20 '08 #1
Share this Question
Share on Google+
12 Replies


Markus
Expert 5K+
P: 6,050
You don't show how you're retrieving the value of the textbox. Please do.

Cheers.
Oct 20 '08 #2

P: 7
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_quantity" action="http://www.konacoffee.com/catalog/shopping_cart_action-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.php.

Shown below

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3.   class easy_discount {
  4.     var $discounts;
  5.  
  6.     function easy_discount () {
  7.       $this->discounts = array();
  8.     }
  9.  
  10.     function reset() {
  11.       $this->discounts = array();
  12.     }
  13.  
  14.     function set($type,$description, $amount) {
  15.      $this->discounts[$type] = array('description' => $description, 'amount' => $amount);
  16.     }
  17.  
  18.     function add($type,$description, $amount) { // obsolete
  19.      $this->discounts[$type] = array('description' => $description, 'amount' => $amount);
  20.     }
  21.  
  22.     function clear($type) {
  23.       if (isset($this->discounts[$type])) unset($this->discounts[$type]);
  24.     }
  25.  
  26.     function remove_type($type) { // obsolete
  27.       if (isset($this->discounts[$type])) unset($this->discounts[$type]);
  28.     }
  29.  
  30.     function count() { 
  31.       return sizeof($this->discounts);
  32.     }
  33.  
  34.     function get($type) { 
  35.       return $this->discounts[$type];
  36.     }
  37.  
  38.     function total() {
  39.       reset($this->discounts);
  40.       $total = 0;
  41.       while (list($type, ) = each($this->discounts)) {
  42.        $total = $total + $this->discounts[$type]['amount'];
  43.       }
  44.       return $total;
  45.     }
  46.  
  47.     function get_all() {
  48.       $discounts_array = array();
  49.       reset($this->discounts);
  50.       while (list($type, ) = each($this->discounts)) {
  51.           $discounts_array[] = array('description' => $this->discounts[$type]['description'],
  52.                                      'amount' => $this->discounts[$type]['amount']);
  53.       }
  54.       return $discounts_array;
  55.     }
  56.   }
  57. ?>
  58.  
  59.  
Oct 20 '08 #3

P: 7
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_quantity" action="http://www.konacoffee.com/catalog/shopping_cart.php?action=update_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:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. 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>';
  3. ?>
  4.  
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.
Oct 21 '08 #4

Markus
Expert 5K+
P: 6,050
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.
Oct 21 '08 #5

P: 7
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.
Oct 22 '08 #6

Markus
Expert 5K+
P: 6,050
If the name of the checkbox is promo_code, then check that it is in the POST array.

Expand|Select|Wrap|Line Numbers
  1. if( isset( $_POST['promo_code'] ) )
  2.     // promo_code was selected
  3. else
  4.     // promo_code wasn't selected
  5.  
Oct 22 '08 #7

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

Expand|Select|Wrap|Line Numbers
  1. if( isset( $_POST['promo_code'] ) )
  2.     // promo_code was selected
  3. else
  4.     // promo_code wasn't selected
  5.  
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.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Coffee Club:<input type="checkbox" name="promo_code" value="CLUB"  />
  3.  
  4. <?php
  5. $promo_code = CLUB;
  6. if( isset( $_POST['promo_code'] ) )
  7. {
  8. $easy_discount->add('CCD','Coffee Club Discount',$cart->show_total()*0.1);
  9. }
  10. ?>
  11.  
and here is what I have that does work...If you enter the text "CLUB" manually.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3. 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>';
  4.  
  5.  
  6. if($promo_code == 'CLUB')
  7. {
  8. $easy_discount->add('CCD','Coffee Club Discount',$cart->show_total()*0.1);
  9.  
  10.  
Do you drink coffee? I have some really good coffee....guess I'm much better at coffee than coding. ;-)

Thank YOU,
Robin
Oct 22 '08 #8

Markus
Expert 5K+
P: 6,050
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.
Oct 22 '08 #9

P: 7
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.php with an item added. There is a lot going on here.

Expand|Select|Wrap|Line Numbers
  1. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html dir="LTR" lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <title>KonaCoffee.com</title>
  6. <base href="http://www.konacoffee.com/catalog/">
  7. <link rel="stylesheet" type="text/css" href="stylesheet.css">
  8. </head>
  9. <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
  10. <!-- header //-->
  11. <link rel="Shortcut Icon" href="/favicon.ico" alt="kona coffee">
  12. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  13.   <tr class="header">
  14.     <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>
  15.  
  16.             <td width="81%" align=right background="images/beans.gif">
  17.  
  18.           <div align="center" class="originalbanner">the Original on-line Kona Coffee Store - Est 1995 </div></td>
  19.   </tr>
  20. </table>
  21. <table border="0" width="100%" cellspacing="0" cellpadding="1">
  22.   <tr class="headerNavigation">
  23.     <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>
  24.  
  25.     <!-- PWA BOF -->    
  26.     <td align="right" class="headerNavigation"><a href="http://www.konacoffee.com/catalog/shopping_cart.php" 
  27. class="headerNavigation">Cart Contents</a> &nbsp;|&nbsp; <a href="https://www.konacoffee.com/catalog/checkout_shipping.php" class="headerNavigation">Checkout</a> &nbsp;&nbsp;</td>
  28.     <!-- PWA EOF -->
  29.   </tr>
  30. </table>
  31. <!-- header_eof //-->
  32.  
  33. <!-- body //-->
  34.  
  35. <table border="0" width="100%" cellspacing="3" cellpadding="3">
  36.   <tr>
  37.     <td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
  38. <!-- left_navigation //-->
  39. <!-- categories //-->
  40.           <tr>
  41.             <td>
  42. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  43.   <tr>
  44.     <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt=""></td>
  45.  
  46.     <td width="100%" height="14" class="infoBoxHeading">Categories</td>
  47.     <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
  48.   </tr>
  49. </table>
  50. <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
  51.   <tr>
  52.     <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
  53.   <tr>
  54.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  55.  
  56.   </tr>
  57.   <tr>
  58.     <td align="left" class="boxText"><a href="http://www.konacoffee.com/catalog/index.php?cPath=21">Kona Coffee-&gt;</a><br></td>
  59.   </tr>
  60.   <tr>
  61.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  62.   </tr>
  63. </table>
  64. </td>
  65.  
  66.   </tr>
  67. </table>
  68.             </td>
  69.           </tr>
  70.  
  71.  
  72. <!-- categories_eof //-->
  73. <!-- specials //-->
  74.           <tr>
  75.             <td>
  76. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  77.   <tr>
  78.  
  79.     <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
  80.     <td width="100%" height="14" class="infoBoxHeading">Specials</td>
  81.     <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>
  82.   </tr>
  83. </table>
  84. <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
  85.   <tr>
  86.     <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
  87.   <tr>
  88.  
  89.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  90.   </tr>
  91.   <tr>
  92.     <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>
  93.   </tr>
  94.   <tr>
  95.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  96.  
  97.   </tr>
  98. </table>
  99. </td>
  100.   </tr>
  101. </table>
  102.             </td>
  103.           </tr>
  104. <!-- specials_eof //-->
  105. <!-- information //-->
  106.           <tr>
  107.             <td>
  108.  
  109. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  110.   <tr>
  111.     <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
  112.     <td width="100%" height="14" class="infoBoxHeading">Information</td>
  113.     <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
  114.   </tr>
  115. </table>
  116. <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
  117.   <tr>
  118.     <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
  119.  
  120.   <tr>
  121.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  122.   </tr>
  123.   <tr>
  124.     <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>
  125.   </tr>
  126.   <tr>
  127.  
  128.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  129.   </tr>
  130. </table>
  131. </td>
  132.   </tr>
  133. </table>
  134.             </td>
  135.           </tr>
  136. <!-- information_eof //-->
  137.  
  138. <!-- left_navigation_eof //-->
  139.     </table></td>
  140.  
  141. <!-- body_text //-->
  142.     <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">
  143.       <tr>
  144.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  145.           <tr>
  146.             <td class="pageHeading">What's In Your Cart?</td>
  147.             <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>
  148.           </tr>
  149.         </table></td>
  150.  
  151.       </tr>
  152.       <tr>
  153.         <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
  154.       </tr>
  155.       <tr>
  156.         <td>
  157. <input type="hidden" name="id[28{3}1][3]" value="1"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListing">
  158.   <tr>
  159.     <td align="center" class="productListing-heading">Remove</td>
  160.  
  161.     <td class="productListing-heading">Product(s)</td>
  162.     <td align="center" class="productListing-heading">Qty.</td>
  163.     <td align="right" class="productListing-heading">Total</td>
  164.   </tr>
  165.   <tr class="productListing-even">
  166.     <td align="center" class="productListing-data" valign="top"><input type="checkbox" name="cart_delete[]" value="28{3}1"  onclick='document.cart_quantity.submit();'></td>
  167.     <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>
  168.  
  169.     <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>
  170.     <td align="right" class="productListing-data" valign="top"><b>$27.95</b></td>
  171.   </tr>
  172. </table>
  173.         </td>
  174.       </tr>
  175.  
  176.       <tr>
  177.         <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
  178.       </tr>
  179.  
  180.       <tr>
  181.         <td align="right" class="main"><b>Sub-Total: $27.95</b></td>
  182.  
  183.      </tr>
  184.  
  185.  
  186.  
  187.       <tr>
  188.         <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
  189.       </tr>
  190.       <tr>
  191.         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  192.  
  193.           <tr class="infoBoxContents">
  194.             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  195.               <tr>
  196.                 <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
  197.                 <td class="main"></td>
  198.  
  199. <tr><table border="0" width="100%" cellspacing="0" cellpadding="0">
  200. <tr>
  201. <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="5"></td>
  202. </tr>
  203. <tr>
  204. Join Coffee Club:<input type="checkbox" name="promo_code" value="CLUB" />
  205.  
  206.  
  207. <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>
  208. </table></td>
  209.           </tr>
  210.         </table></td>
  211.  
  212.         <tr>
  213. <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="5"></td>
  214. </tr>
  215.  
  216. <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
  217.       </tr>
  218.  
  219.       <tr>
  220.         <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  221.           <tr class="infoBoxContents">
  222.             <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  223.               <tr>
  224.                 <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
  225.                 <td class="main"></td>
  226.  
  227. <tr><table border="0" width="100%" cellspacing="0" cellpadding="0">
  228. <tr>
  229.  
  230. <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="5"></td>
  231. </tr>
  232. <tr>               
  233.  
  234.                 <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 ">                
  235.                 <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>
  236.                 <td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
  237.               </tr>
  238.             </table></td>
  239.           </tr>
  240.         </table></td>
  241.       </tr>
  242.  
  243.     </table></form></td>
  244. <!-- body_text_eof //-->
  245.     <td width="125" valign="top"><table border="0" width="125" cellspacing="0" cellpadding="2">
  246. <!-- right_navigation //-->
  247. <!-- shopping_cart //-->
  248.           <tr>
  249.             <td>
  250. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  251.   <tr>
  252.     <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
  253.  
  254.     <td width="100%" height="14" class="infoBoxHeading">Shopping Cart</td>
  255.     <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>
  256.   </tr>
  257. </table>
  258. <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
  259.   <tr>
  260.     <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
  261.   <tr>
  262.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  263.  
  264.   </tr>
  265.   <tr>
  266.     <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>
  267.   </tr>
  268.   <tr>
  269.     <td class="boxText"><img src="images/pixel_black.gif" border="0" alt="" width="100%" height="1"></td>
  270.   </tr>
  271.  
  272.   <tr>
  273.     <td align="right" class="boxText">$27.95</td>
  274.   </tr>
  275.   <tr>
  276.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  277.   </tr>
  278. </table>
  279. </td>
  280.   </tr>
  281.  
  282. </table>
  283.             </td>
  284.           </tr>
  285. <!-- shopping_cart_eof //-->
  286. <!-- Security //-->
  287.           <tr>
  288.             <td>
  289. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  290.   <tr>
  291.     <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
  292.     <td width="100%" height="14" class="infoBoxHeading">Hacker Safe</td>
  293.  
  294.     <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
  295.   </tr>
  296. </table>
  297. <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
  298.   <tr>
  299.     <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
  300.   <tr>
  301.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  302.   </tr>
  303.   <tr>
  304.  
  305.     <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>
  306.   </tr>
  307.   <tr>
  308.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  309.   </tr>
  310. </table>
  311. </td>
  312.   </tr>
  313. </table>
  314.             </td>
  315.  
  316.           </tr>
  317. <!-- Security_eof //-->
  318.  
  319. <!-- reviews //-->
  320.           <tr>
  321.             <td>
  322. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  323.   <tr>
  324.     <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt=""></td>
  325.     <td width="100%" height="14" class="infoBoxHeading">Reviews</td>
  326.  
  327.     <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>
  328.   </tr>
  329. </table>
  330. <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
  331.   <tr>
  332.     <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
  333.   <tr>
  334.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  335.   </tr>
  336.   <tr>
  337.  
  338.     <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>
  339.   </tr>
  340.   <tr>
  341.     <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
  342.   </tr>
  343. </table>
  344. </td>
  345.   </tr>
  346. </table>
  347.             </td>
  348.  
  349.           </tr>
  350. <!-- reviews_eof //-->
  351. <tr>
  352.                     <td class="pageHeading" height="100%" valign="top">
  353.                     </td>
  354.                   </tr>
  355. <!-- right_navigation_eof //-->
  356.     </table></td>
  357.   </tr>
  358. </table>
  359. <!-- body_eof //-->
  360.  
  361. <!-- footer //-->
  362. <table border="0" width="100%" cellspacing="0" cellpadding="1">
  363.   <tr class="footer">
  364.     <td class="footer">&nbsp;&nbsp;Wednesday 22 October, 2008&nbsp;&nbsp;</td>
  365.     <td align="right" class="footer">&nbsp;&nbsp;1592439 requests since Wednesday 22 February, 1995&nbsp;&nbsp;</td>
  366.   </tr>
  367. </table>
  368. <br>
  369. <table border="0" width="100%" cellspacing="0" cellpadding="0">
  370.   <tr>
  371.  
  372.     <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>
  373.   </tr>
  374. </table>
  375. <!-- footer_eof //-->
  376. <br>
  377. </body>
  378. </html>
  379.  
Oct 22 '08 #10

Markus
Expert 5K+
P: 6,050
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'.
Oct 22 '08 #11

P: 7
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....
Oct 23 '08 #12

Markus
Expert 5K+
P: 6,050
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.
Oct 23 '08 #13

Post your reply

Sign in to post your reply or Sign up for a free account.