Print all Posted Variables


/ Published in: PHP
Save to your folder(s)

This code will loop through any posted variables and print the name of the field as well as the value of the field.


Copy this code and paste it in your HTML
  1. $html = "";
  2. foreach($_REQUEST as $vn=>$vv) {
  3. if(preg_match("/^[a-zA-Z]/",$vn) && $vn != "B1" && $vv != "") {
  4. $html .= str_replace('_',' ',$vn) . " : $vv
  5. ";
  6. }// end if
  7. }// end foreach

Report this snippet


Comments


You need to login to view comments.