Forum Moderators: coopster
<select name="programme">
<option value="" selected="">Choose Programme:</option>
<option value="7.00">3 Months</option>
<option value="11.00">6 Months</option>
<option value="85.00">12 Months</option>
<option value="900.00">24 Months</option>
</select> <select name="programme">
<option value="" selected="">Choose Programme:</option>
<option value="7.00" id="3" name="3 months">3 Months</option>
</select> <?php
//collecting variables from previous form
$quote = $_POST["programme"];
$make = $_POST["make"];$reg = $_POST["reg"];$serial = $_POST["serial"];
$title = $_POST["title"];$in = $_POST["initial"];$sur = $_POST["surname"];
$add1 = $_POST["address1"];$add2 = $_POST["address2"];$add3 = $_POST["address3"];$code = $_POST["postcode"];
$tel = $_POST["tel"];$email = $_POST["email"];
?> <form method="post" action="testa.php">
<input name="programme" type="hidden" value="<?php echo "$quote";?>" />
<input name="make" type="hidden" value="<?php echo "$make";?>" />
<input name="reg" type="hidden" value="<?php echo "$reg";?>" />
<input name="serial" type="hidden" value="<?php echo "$serial";?>" />
<input name="title" type="hidden" value="<?php echo "$title";?>" />
<input name="initial" type="hidden" value="<?php echo "$in";?>" />
<input name="surname" type="hidden" value="<?php echo "$sur";?>" />
<input name="address1" type="hidden" value="<?php echo "$add1";?>" />
<input name="address2" type="hidden" value="<?php echo "$add2";?>" />
<input name="address3" type="hidden" value="<?php echo "$add3";?>" />
<input name="postcode" type="hidden" value="<?php echo "$code";?>" >
<input name="tel" type="hidden" value="<?php echo "$tel";?>"/>
<input name="email" type="hidden" value="<?php echo "$email";?>"/>
</form> <option value="7.00">3 Months</option>
<input name="make" type="hidden" value="3 Months" />
<?php
function programme_value_to_text($value) {
$text = array(
'7.00' = > '3 Months',
'11.00' = > '6 Months',
'85.00' = > '12 Months',
'900.00' = > '24 Months'
);
if(array_key_exists($value, $text)) {
return $text[$value];
} else {
return '';
}
}
?>
<input name="programme" type="hidden" value="<?php echo programme_value_to_text($quote); ?>" />
<option value="7.00" id="3" name="3 months">3 Months</option>
$_SESSION['foo'] = '7.00';
$_SESSION['bar'] = '3 months';
<option value="7.00">3 Months</option>
<?php
//collecting variables from previous form
$quote = $_POST["programme"];
$make = $_POST["make"];$reg = $_POST["reg"];$serial = $_POST["serial"];
$title = $_POST["title"];$in = $_POST["initial"];$sur = $_POST["surname"];
$add1 = $_POST["address1"];$add2 = $_POST["address2"];$add3 = $_POST["address3"];$code = $_POST["postcode"];
$tel = $_POST["tel"];$email = $_POST["email"];
?>
<div id="twocolbLong">
<div id="tcbloLeft">
<div class="bluelongBlock">
<div class="fbTitle">Caravans -<br />
Extended Warranty</div>
<p>Hello <?php echo "$title"; echo " $sur" ?> please find your quote for your Caravan Warranty below.</p>
<div class="quoTeb"><?php echo "$quote";?></div>
<p>If you are happy to go ahead with this quote, please click on submit below.</p>
<!-- form -->
<form method="post" action="testa.php">
<input name="programme" type="hidden" value="<?php echo "$quote";?>" />
<input name="make" type="hidden" value="<?php echo "$make";?>" />
<input name="reg" type="hidden" value="<?php echo "$reg";?>" />
<input name="serial" type="hidden" value="<?php echo "$serial";?>" />
<input name="title" type="hidden" value="<?php echo "$title";?>" />
<input name="initial" type="hidden" value="<?php echo "$in";?>" />
<input name="surname" type="hidden" value="<?php echo "$sur";?>" />
<input name="address1" type="hidden" value="<?php echo "$add1";?>" />
<input name="address2" type="hidden" value="<?php echo "$add2";?>" />
<input name="address3" type="hidden" value="<?php echo "$add3";?>" />
<input name="postcode" type="hidden" value="<?php echo "$code";?>" >
<input name="tel" type="hidden" value="<?php echo "$tel";?>"/>
<input name="email" type="hidden" value="<?php echo "$email";?>"/>
<input type="image" src="button.png" name="image" style="padding:10px 0px 0px 35px;" />
</form>
<!-- form -->
</div>
</div>
</div>
<div id="tcbloRight"> </div>
$month = $_POST['month_field']; // or what you call it
$value = $price_array[$month];
echo $month.' Months'; echo $value; <?php
$month = $_POST['month_field']; // or what you call it
$value = $price_array[$month];
echo $month.' Months';
echo $value; ?>
<select name="programme">
<option value="" selected="">Choose Programme:</option>
<option value="7.00">3 Months</option>
<option value="11.00">6 Months</option>
<option value="85.00">12 Months</option>
<option value="900.00">24 Months</option>
</select> <form method="post" action="page2.php">
<div class="formHoldc">
<div class="fhLeftc">Programme:</div>
<div class="fhRightc"><select name="programme">
<option value="" selected="">Choose Programme:</option>
<?php
$price_array[3] = '7.00';
$price_array[6] = '11.00';
$price_array[12] = '85.00';
$price_array[24] = '900.00';
foreach ($price_array as $month=>$value)
{
echo '<option value="'.$month.'">'.$month.' Months</option>';
}
?>
</select>
<br /><br />
<input type="image" src="http://www.gatewayleisuregroup.com/new/images/buttons/submitblue.png" name="image" style="padding:10px 0px 0px 35px;" />
</div>
</form>
<form method="post" action="page2.php">
<div class="formHoldc">
<div class="fhLeftc">Programme:</div>
<div class="fhRightc"><select name="programme">
<option value="" selected="">Choose Programme:</option>
<?php
$price_array[3] = '7.00';
$price_array[6] = '11.00';
$price_array[12] = '85.00';
$price_array[24] = '900.00';
foreach ($price_array as $month=>$value)
{
echo '<option value="'.$month.'">'.$month.' Months</option>';
}
?>
</select>
<br /><br />
<input type="image" src="http://www.gatewayleisuregroup.com/new/images/buttons/submitblue.png" name="image" style="padding:10px 0px 0px 35px;" />
</div>
</form> <?php
$month = $_POST['programme'];
$value = $price_array[$month];
echo $month.' Months';
echo $value; ?>