M
M
mrzgt2015-09-25 20:08:21
PHP
mrzgt, 2015-09-25 20:08:21

How to save the selected select value when moving to another page?

How to save the selected select value when moving to another page

<?php if ($option['type'] == 'select') { ?>
<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
<div class="optionsnam">
<b><?php echo $option['name']; ?>:</b><br />
</div>
<select class="form-control" name="option[<?php echo $option['product_option_id']; ?>]" 
 onchange="calc_price(<?php echo $product['product_id']; ?>);" >
<?php /* <option value=""
 price_prefix="+" price="0"><?php echo $text_select; ?></option> */ ?>
<?php foreach ($option['option_value'] as $option_value) { ?>
<option value="<?php echo $option_value['product_option_value_id']; ?>"
                                                                  price_prefix="<?php echo $option_value['price_prefix']; ?>" price="<?php echo $option_value['price_value']; ?>"
 ><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
 (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
 <?php } ?>
    </option>
    <?php } ?>
 </select>
</div>
                                                        <br />
                                                        <?php } ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2015-09-25
@Taraflex

https://jsfiddle.net/QW01_01/5und7600/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question