I wonder if there any better ideas to solve the problem below,
I have a form with a number of input fields, such as,
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.