i have a little problem with storing the $_POST data, think i might be confusing myself a little.
So i have some data being posted from a loop, this data is posted as id and points, but each has a number to it so if three records are being posted we’ll have
id1, id2, id3
points1, points2, points3
to collect. Now i’m using a for loop to go through the data and post it into two arrays to work with. The problem is When I want to store the data i have to use one of the names listed above ie id1 or id2. Here is my code
for($i = 0; i< $_POST['count']; i++){
//Order input data into an array
$inputid[$i] = $_POST['id1'];
}
Now the number part of the ‘id’ of the $_POST[‘id1’] has to be the same as $i in the for loop so it will increment as the loop does.
Thanks for the help and i hope i explained the question right.
1 Answer