i appologize for the erratic method of forming my question. let me start over.
i have a page with an input that has a value of 50.00 and an id/name of x_amount. then on another page, that is going to be included to the static document, i would like to add to the variable x_amount (which is set to 50.00) 125.00.
In the end i will have four of these documents with different amounts and whenever they are included i want the value of x_amount to change.
if this still does not make sense here is slim'd down version of my code.
page 1
--------------------------------------------------------------
<form action="../sim.php" method="post" name="contact" id="contact">
<p>
<input name="x_Amount" id="x_Amount" size="50" type="hidden">
</p>
Name:<br />
<input name="Name" id="" size="50" type="text">
<br />
Company:<br />
<input name="company" id="" size="50" type="text">
<br />
Address:<br />
<input name="address" id="" size="50" type="text">
<br />
Phone: <br />
<input name="phone" id="" size="12" type="text">
<br>
<br />
<br />
Would you like to register any golfers for only $125 a piece.
<a href="?content=oneplayer">1</a>
<a href="?content=twoplayer">2</a>
<a href="?content=threeplayer">3</a>
<a href="?content=fourplayer">4</a>
<br />
<br />
<br />
<?php
$content=$_GET['content'];
if (empty($content)) { $content='none'; }
switch ($content) {
case "none":
include ('blank.php');
break;
case "oneplayer":
include ('onep.php');
break;
case "twoplayer":
include ('twop.php');
break;
case "threeplayer":
include ('threep.php');
break;
case "fourplayer":
include ('fourp.php');
break;
}
?>
<input name="Submit" value="Submit" type="submit">
</form>
page 2
-------------------------------------------------------------------
<?
$xamount = $_POST['x_Amount'];
$second = $_POST['second'];
$xamount += 125;
?>
<input type="submit" value="Calculate values"/>
|