Posted: Fri Nov 11, 2005 11:46 am
Jenk, that was only to get him to understand what he was doing wrong there...
Although I know other shortcuts too 
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<form name="form1" action="step2.php" method="post">
<input size="3" maxlength="1" name="adults" id="adults" />
<input size="3" maxlength="1" name="children" id="children" />
<input type="submit" value="calculate" />
</form>Code: Select all
<?php
session_start(); //Start Session
header("Cache-control: private"); //ie6 fix
$adults=$_POST['adults'];
$children=$_POST['children'];
$premium = bcmul(157,$adults,2) + bcmul(79,$children,2);
echo "$premium";
?>Code: Select all
<?php
$adults=$_SESSION['adults'];
$children=$_SESSION['children'];
$aps = $adults + $children;
$i = 0;
while ($i<$aps) {
$i++;
print "<tr><td>\n";
print "<input name=\"initial"."$i"."\" />\n";
print "<input name=\"surname"."$i"."\" />\n";
print "</td></tr>\n";
}
?>Code: Select all
<?php
$_SESSION['initial ? //here... Someway of recalling the stored variables from the session data.
//here....For loop reeling off the stored variables.
?>