Check query string (PHP)

后端 未结 5 1958
闹比i
闹比i 2021-01-14 21:21

I use a query string, for example test.php?var=1.

How can I check if a user types anything after that, like another string...

I try to redirect

5条回答
  •  广开言路
    2021-01-14 22:08

    I think you are trying to get rid of unwanted parameters. This is usually done for security reasons.

    There won't be a problem, however, if you preinitalize every variable you use and only use variables with $_GET['var'], $_POST['var'] or $_REQUEST['var'].

提交回复
热议问题