Posting array from form

前端 未结 7 767
刺人心
刺人心 2020-11-27 05:45

I have a form on my page with a bunch of inputs and some hidden fields, I\'ve been asked to pass this data through a \"post array\" only im unsure on how to do this,

<
7条回答
  •  情书的邮戳
    2020-11-27 06:05

    If you want everything in your post to be as $Variables you can use something like this:

    foreach($_POST as $key => $value) { eval("$" . $key . " = " . $value"); }

提交回复
热议问题