submitting a GET form with query string params and hidden params disappear

前端 未结 10 671
庸人自扰
庸人自扰 2020-11-22 02:22

Consider this form:

10条回答
  •  长情又很酷
    2020-11-22 03:25

    This is in response to the above post by Efx:

    If the URL already contains the var you want to change, then it is added yet again as a hidden field.

    Here is a modification of that code as to prevent duplicating vars in the URL:

    foreach ($_GET as $key => $value) {
        if ($key != "my_key") {
            echo("");
        }
    }
    

提交回复
热议问题