antonyf
12-13-2011, 12:21 PM
Hi.
I am trying to $_GET the values from an url.
My problem is i don't have the full variable.
IE: &name=john
$_GET['name']// outputs john. // is normal example
but this variable is different. The variable is first built with javascript then passed to the url. The variable then has a numeric value added to the variable.
here is snippet of url:
&item_name_1=test_item&item_number_1=1&quantity_1=14&amount_1=99
The variable for &item_name_1 is actually $item_name_ there is no numeric value. the value will come from the &item_number_1 BUT!! &item_number_1 the variable is $item_number_ without the numeric value??
Here is the source source of how the variables are built:
itemsString = itemsString +
"&item_name_" + counter + "=" + item.name +
"&item_number_" + counter + "=" + counter +
"&quantity_" + counter + "=" + item.quantity +
"&amount_" + counter + "=" + item.price +
"&on0_" + counter + "=" + "Options" +
"&os0_" + counter + "=" + optionsString;
I am trying to $_GET the values from an url.
My problem is i don't have the full variable.
IE: &name=john
$_GET['name']// outputs john. // is normal example
but this variable is different. The variable is first built with javascript then passed to the url. The variable then has a numeric value added to the variable.
here is snippet of url:
&item_name_1=test_item&item_number_1=1&quantity_1=14&amount_1=99
The variable for &item_name_1 is actually $item_name_ there is no numeric value. the value will come from the &item_number_1 BUT!! &item_number_1 the variable is $item_number_ without the numeric value??
Here is the source source of how the variables are built:
itemsString = itemsString +
"&item_name_" + counter + "=" + item.name +
"&item_number_" + counter + "=" + counter +
"&quantity_" + counter + "=" + item.quantity +
"&amount_" + counter + "=" + item.price +
"&on0_" + counter + "=" + "Options" +
"&os0_" + counter + "=" + optionsString;