You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
685 B
23 lines
685 B
<?php
|
|
|
|
parse_str(file_get_contents("php://input"), $data); /* 取得資料並轉成array */
|
|
|
|
foreach ($data as $key => $value){
|
|
if ((substr($key, 0, 4) == "item") && (substr($key, 0, 5) != "item_")){
|
|
array_push($item, $value); //取出item號碼放入array中
|
|
}
|
|
|
|
if (substr($key, 0, 11) == "item_detail"){
|
|
array_push($item_detail, urlencode($value)); //取出detail放入array中
|
|
}
|
|
|
|
if ((substr($key, 0, 4) == "item") && (substr($key, 0, 5) != "item_")){
|
|
if (isset($_REQUEST[$value])) { //判斷item是否有被點選
|
|
array_push($result, $_POST[substr($key, 4)]); //取出result放入array中
|
|
#echo $value . ":" . $_POST[substr($key, 4)] . "<br>";
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
?>
|