//retrieving dynamic order info
for ($i = 1; $i <= (int)$_SESSION['number_of_individual_designs']; $i++) {
$_SESSION['design_'.$i.'_name'] = $_REQUEST['design_'.$i.'_name'];
$_SESSION['design_'.$i.'_qty'] = $_REQUEST['design_'.$i.'_qty'];
$_SESSION['design_'.$i.'_size_w_1'] = $_REQUEST['design_'.$i.'_size_w_1'];
$_SESSION['design_'.$i.'_size_w_2'] = $_REQUEST['design_'.$i.'_size_w_2'];
$_SESSION['design_'.$i.'_size_h_1'] = $_REQUEST['design_'.$i.'_size_h_1'];
$_SESSION['design_'.$i.'_size_h_2'] = $_REQUEST['design_'.$i.'_size_h_2'];
$_SESSION['design_'.$i.'_num_of_extension'] = $_REQUEST['design_'.$i.'_num_of_extension'];
<?
$qty_sum=0; //holds the total qty
for ($i=1; $i<=$_SESSION['number_of_individual_designs']; ++$i){
?>
Design <?= $i ?> <br />
Quantity <?= $_SESSION['design_'.$i.'qty']?>
<? $qty_sum += $_SESSION['design_'.$i.'qty'];
}
?>
num of unique shipping address
<!-- self post to self so you can get the number of address the user selected from the drop down -->
<form method="post" action="shipping_address.php">
<select id="num_shipping_addr" name="num_shipping_addr" onchange="submit();">
<option value="">Select...</option>
<?
for ($a=1; $a<=$qty_sum; ++$a){
?>
<option value="<?=$a?>"><?=$a?></option>
<?
}
?>
</select>
</form>
<!-- based on the number the user selected from the dropdown box above, create the appropriate number of address fields -->
<form method="post" action="shipping_address_process.php">
<?
$num_shipping_addr = $_REQUEST['num_shipping_addr'];
for ($c = 1; $c <= $num_shipping_addr; ++$c) {
?>
<h1>address <?=$c?></h1>
address 1 <input type="text" name="address_<?=$c?>_addr_1" id="" />
address 2 <input type="text" name="address_<?=$c?>_addr_2" id="" />
<?
}
?>
</form>
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE