I have a page with a form that has 15 different inputs.
These inputs will be added to a database.
These inputs are named "variable1", "variable2", "variable3", etc.
After clicking the submit button, I want there to be some kind of a loop that turns these variables from POST variables to simple variables.
Something like this:
<?
$i = 1;
while ($i <= 15) {
$variable$i = $_POST['variable$i'];
$i++;
}
?>
This would create the variable $variable1 equal to whatever the input of variable1 was on the previous page (all the way to $variable15).
However, this does not work. I can't think of another way to get it to work, so I'd appreciate it if someone could give me a hand.
Thanks 🙂