pdheady
asked on
How would I put this into a PHP function?
$pretty_credit_limit = number_format($creditLimit );
$pretty_credit_limit = "$" . $pretty_credit_limit;
if ($returnCode == "01") {
$pretty_status = "Approval"; $border_color = "green"; $subprime_msg = "Submitted"; $opportunity_status_id = 3;
} elseif ($returnCode == "02") {
$pretty_status = "Referral (Under Manual Review). Please call xxxxx at 1-800-555-1212 for an update on the application and reference patient $first_names $last_name (#$contact_id)."; $border_color = "orange"; $opportunity_status_id = 23;
} elseif ($returnCode == "03") {
$ref = $_SERVER['HTTP_REFERER'];
header( 'refresh: 1; url='.$ref . '?returnCode=03&errorMessa ge=$errorM essage&opp ortunity_i d=$opportu nity_id&re submit=1') ;
} elseif ($returnCode == "07") {
$pretty_status = "Invalid SSN. Social security number is either not numeric, does not match the SSN received"; $border_color = "orange"; $opportunity_status_id = 23;
} elseif ($returnCode == "09") {
$pretty_status = "Referral (Under Manual Review)"; $border_color = "orange"; $opportunity_status_id = 9;
}
$pretty_credit_limit = "$" . $pretty_credit_limit;
if ($returnCode == "01") {
$pretty_status = "Approval"; $border_color = "green"; $subprime_msg = "Submitted"; $opportunity_status_id = 3;
} elseif ($returnCode == "02") {
$pretty_status = "Referral (Under Manual Review). Please call xxxxx at 1-800-555-1212 for an update on the application and reference patient $first_names $last_name (#$contact_id)."; $border_color = "orange"; $opportunity_status_id = 23;
} elseif ($returnCode == "03") {
$ref = $_SERVER['HTTP_REFERER'];
header( 'refresh: 1; url='.$ref . '?returnCode=03&errorMessa
} elseif ($returnCode == "07") {
$pretty_status = "Invalid SSN. Social security number is either not numeric, does not match the SSN received"; $border_color = "orange"; $opportunity_status_id = 23;
} elseif ($returnCode == "09") {
$pretty_status = "Referral (Under Manual Review)"; $border_color = "orange"; $opportunity_status_id = 9;
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER