POST- Passing to a variable on the other side
Posted: Sun May 11, 2003 8:42 pm
My dilemma:
Once the form gets submitted, and comes through to the target php file, I have this variable problem.. the values being passed from the form are called name1, name2, name3 and so on.. a bunch..
is there a way to reference them other then typing out name1, name2 etc.
ie. something like $name = $_POST['name']; where I can just use loops to assign the variables.. the example I gave on the line above doesn't work for me. Where i is 1,2,3,4,5 and so on from a loop counter
$name = $_POST['name'];
$name1 = $_POST['name2'];
$name2 = $_POST['name3'];
is what i've been doing, but I can't do it because there's too many, a loop would work if I could reference inside the brackets with a counter like "i"
any help would be appreciated
Once the form gets submitted, and comes through to the target php file, I have this variable problem.. the values being passed from the form are called name1, name2, name3 and so on.. a bunch..
is there a way to reference them other then typing out name1, name2 etc.
ie. something like $name = $_POST['name']; where I can just use loops to assign the variables.. the example I gave on the line above doesn't work for me. Where i is 1,2,3,4,5 and so on from a loop counter
$name = $_POST['name'];
$name1 = $_POST['name2'];
$name2 = $_POST['name3'];
is what i've been doing, but I can't do it because there's too many, a loop would work if I could reference inside the brackets with a counter like "i"
any help would be appreciated