Jump to content

[SOLVED] Pass Select List Value via POST problems


joshluv33

Recommended Posts

I created a drop down list from my db which shows a product and the option value is the price associated with that product.  I need to have the price value passed to a different page which will add it to some other values to create a total price.  Here is the code from the select list:

 

<?php 
                          $printtype_result = mysql_query("SELECT id,name,price,quan_avail,bypass FROM prints where quan_avail > 0 order by porder", $db);
					  $printtype_rows = mysql_num_rows($printtype_result);
					  $printtype = mysql_fetch_object($printtype_result);

					   ?>  
                                                    
                          
					  <?PHP
					  echo "<tr><td class=\"photo_details\" bgcolor=\"#F9F9F9\" style=\"border: 1px solid #eeeeee; padding: 10px;\">";
						echo "<div align=\"center\" style=\"background-color: #eeeeee; margin-bottom: 10px; padding: 3px;\"><b>".$details_po_purchase_title."</b></div>";
						?>
                          
					  <select name="printprice" style="width:500px;">
                          <option value=""><?PHP echo $detail_po_select; ?></option>
                          
                          <?php do { 
					  
					  ?>                        
					  
                          <option value="<?php $printtype->price; ?>"><? echo $printtype->name . " - (" . $currency->sign . $printtype->price; ?>)</option>
                          
                          <?php 
					  
					  } while($printtype = mysql_fetch_object($printtype_result))?>
					  
                          </select>

 

This list is part of a larger form: 

<form name="po_order" method="post" action="public_actions.php?pmode=add_cart">

 

This is from the action page:

$printprice = mysql_real_escape_string($_POST['printprice']);

after $printprice is captured then it is added to some other values to give a grand total: 

$grandrm = $price + $po_price + $printprice;

 

I would appreciate any help in retrieving this part of the form data on the action page.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.