Changed $r_val to be an associative array with RSLT being a numeric value and MSSG being the actual message.  Added a test page to test various functions and code.