How to keep already-set GET parameter values on form submission?

后端 未结 7 890
广开言路
广开言路 2020-12-17 08:10

I have a URL : foo.php?name=adam&lName=scott, and in foo.php I have a form which gives me values of rectangleLength & re

7条回答
  •  被撕碎了的回忆
    2020-12-17 08:32

    You can add two hidden fields in the form on the first target site, blabla.php in your case:

    For a dynamic solution, use a foreach loop:

     $value) {
      $name = htmlspecialchars($name);
      $value = htmlspecialchars($value);
      echo '';
    }
    ?>
    

    You may consider locking the dynamic approach down to a list of known possible keys:

    ';
    }
    ?>
    

提交回复
热议问题