$field_list = parse_product_template($template_id, $pid, $cust_id, 3);
//print_r($field_list);
echo "
\n";
echo "".$pname."
\n";
echo "".$pid."
\n";
foreach ($field_list as $field) {
echo "<".$field.">";
echo $field[1];
//var_dump($_POST[$field[0]]);
var_dump($field);
//echo $_POST['VP'];
echo "".$field.">
\n";
}
echo "
\n";
?>
//function//
//fid == 3 for parsing the form data.
if ($fid == 3) {
$xml = new SimpleXMLElement($template);
//define the array
$form_fields = array();
foreach ($xml->xpath('//Product[ProductNum = '.$pid.']/question') as $question) {
array_push($form_fields, $question['name']);
} //end foreach
return $form_fields;
} // end of fid == 3
}