PHP: a short cut for isset and !empty?

后端 未结 11 2297
余生分开走
余生分开走 2021-02-09 13:45

I wonder if there any better ideas to solve the problem below,

I have a form with a number of input fields, such as,



        
11条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-09 14:14

    Consider using the available-by-default filter extension's filter_input function. You'll avoid the missing index Notice and get data sanitization at the same time.

提交回复
热议问题