Hi,
How can I use an array instead of the list of say 20 variables of the same datatype.
Say here is the data entry page:
$variable1 = $_POST["variable1"];
$variable2 = $_POST["variable2"];
.....
$variable20 = $_POST["variable20"];
<form name= "entry" method="post" action="entrydone.php">
<input type="text" name="variable1" value="<?echo $variable1?>" />
.....
<input type="text" name="variable20" value="<?echo $variable20?>" />
<inupt type="submit" value="continue">
The reason of using variablex= $_POST["variablex"]; is what if user presses back button (not the browser back button) to come back to this page.
and here is to display the data which was entered in text fields of the previous page:
$variable1 = $_POST["variable1"];
$variable2 = $_POST["variable2"];
......
$variable20 = $_POST["variable20"];
echo $variable1;
echo $variable5;
echo $variable20;
echo $variable15;
Thanks in advance 🙂