Empty GET variables displaying in the URL

前端 未结 6 733
星月不相逢
星月不相逢 2020-12-18 17:04

Here is my form :

\';
echo \'

        
6条回答
  •  温柔的废话
    2020-12-18 17:24

    It can't be done with php. That is standard behavior of the html form. If you wanted to do this, you would have to use javascript and onsubmit of the form, loop over and either remove empty elements or build a query string and location.href=myQueryString.

提交回复
热议问题