Hello. I hope this is straight forward question.
I have made a form (using POST method) using php with the following variables:
id[1],id[2]
quantity[1],quantity[2]
retail[1],retail[2]
count and artistsearch.
In another php file I want to read the variables sent to it.
My question is how do you obtain values of the arrays sent to it e.g. id[1] ?
By doing print_r($_POST) I get the following print out:
Array ( [id] => Array ( [1] => 16 [2] => 15 ) [retail] => Array ( [1] => 3.42 [2] => 2.45 ) [quantity] => Array ( [1] => 0 [2] => 0 ) [submit] => Click here to purchase the items shown [count] => 2 [artistsearch] => 2 )
I can read the count and artistsearch variables by using $POST['count'] and $POST['artistsearch]. However, I just cannot work out how to get the values for these arrays!! Please help.