You are here

function hiddenSAMLFields in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

1 call to hiddenSAMLFields()
miniorange_saml_feedback in ./miniorange_saml_feedback.php

File

./miniorange_saml_feedback.php, line 192

Code

function hiddenSAMLFields($key, $value) {
  $hiddenSAMLField = "";
  $value2 = array();
  if (is_array($value)) {
    foreach ($value as $key2 => $value2) {
      if (is_array($value2)) {
        hiddenSAMLFields($key . "[" . $key2 . "]", $value2);
      }
      else {
        $hiddenSAMLField = "<input type='hidden' name='" . $key . "[" . $key2 . "]" . "' value='" . $value2 . "'>";
      }
    }
  }
  else {
    $hiddenSAMLField = "<input type='hidden' name='" . $key . "' value='" . $value . "'>";
  }
  echo $hiddenSAMLField;
}