Thanks for the response!
I understand your logic. I am having difficulty implementing this though.
The way I have my code setup I would want to setup the $_SESSION as follows:
$_SESSION['order'][] = array('id' => $quantity, 'cook_pref' => $temperature)
I am not sure how to make this a part of the code that I inserted in my previous post. I tried modifying based on your input (see code below), but I do not know what to do specifically with the foreach(). I have the $key => $value, but I also need to add the $cooking_pref => temperature in order to populate the array.
Any thoughts would be greatly appreciated. Thanks!
[code=php]function process_form() {
if(!empty($_POST)) {
foreach($_POST as $key => $value) {
if($key != "_submit_check" && $key != "button" && $key != "0" && $key != "") {
if(!empty($value)){
//$arr[$key] = $value;
$_SESSION['order'][] = array($key => $value, $cooking_pref => $temperature);
}
}
}
} [/code]
I am not sure if this is relevant now, but here are all of the fields in my form:
<input name = \"$itemId\" value=\"$quantity\" size=\"3\" />
<select name=\"temperature\">
<option>-- Select --</option>
<option>Blood-Rare</option>
<option>Medium-Rare</option>
<option>Medium</option>
<option>Medium-Well</option>
<option>Well</option>
</select>