How do I take the values submited from a form. Perform a function on them. Such as adding 10. Them place the new values in a new array.
The following code will not add the ammendedvalues to array_new.
#################
function changeFormValues() {
global $HTTP_POST_VARS;
$array_org = $HTTP_POST_VARS;
foreach ($array_org as $FormFieldName=>$FormFieldValue) {
echo "$FormFieldName = ";
$uName = dofunction($FormFieldValue);
echo "$FormFieldValue<br><br>";
// this line fails.
array_push($array_new , $FormFieldValue);
// print all values of new array as they are added
foreach($array_new as $key => $value) {
print "The key is $key: $value =";
echo "new array end<br>";
}
}
echo "End of function";
}
$array_new =array();
changeFormValues()
#############################