Q: Add price values for php variables I have one page with a large form, where customers can select packages to add to their quote. This is then sent to a php page through POST variables, like so:
<form action="packagequote.php" method="POST" name="packages">
<select name="bronzepackage">
            <option value="">--</option>
            <option value="1 Bronze Package">1 (£50)</option>
            <option value="2 Bronze Packages">2 (£90)</option>
            <option value="3 Bronze Packages">3 (£130)</option>
        </select>
</form>

With the php page currently printing the chosen option (i.e a confirmation page), before they click next and it is sent the quote is sent via an email.
<?php 
$bronzepackage = $_POST['bronzepackage'];
echo $bronzeweb;
?>

My (fairly basic) question is, how can I make this page echo both the packages chosen, and the total price of the packages?
The html page will have several other packages they can choose, all sent in the same way, and I'm trying to figure out how to make the second php page show the packages chosen and the prices, preferably without using mySQL tables.
Thanks in advance.
Alternatively, the individual pricing can be removed with the package prices simply compounding (e.g 1=£50, 2=£100) if it is easier to implement.

A: You could do this:
$packages = array(
     1 => array('name' => 'Package one', 'price' => 50),
     2 => array('name' => 'Package two', 'price' => 45)
);

$package_id = $_POST['bronzepackage'];

$package = $packages[$package_id];

// Price: $package['price']
// Name: $package['name']

Then in your template (which will need to be a PHP file):
<select name="bronzepackage">
    <option value="">--</option>

<?php foreach($packages as $id => $package): ?>        
        <option value="<?php echo $id; ?>"><?php echo $package['name'];?> (£<?php echo $package['price']; ?></option>
    <?php endforeach; ?>

</select>

If you're hard coding the template (or using a .html file) then you don't need the template code i've provided, just replace the option values to correspond to the array.
