hi,
i have two scripts, transfer.php3 (first script) that holds data, and nextpage.php3 that retrieves data from transfer.php3
page name: transfer.php3
<form action="nextpage.php3" method="post">
<input type="hidden" name="str1" value="7">
<input type="hidden" name="str2" value="8">
<input type="hidden" name="str3" value="9">
<input type="hidden" name="str4" value="10">
<input type="submit" value="submit">
</form>
page name: nextpage.php3
i used to retrieve data by
$retval1=$str1;
$retval2=$str2;
$retval3=$str3;
$retval4=$str4;
... and it works
but if i used for loop
for ($i=1;$i<=4;$i++){
$retval="str" . $i;
echo "$$retval" . "<br>";
}
it doesn't work, all i now need is to display the values of str1, str2, str3, and str4 using for loop.
THANKS