Debugging will find that when $map is not an array, the variable cannot get the desired value. The official idea is to traverse the encapsulated search conditions $map. Relatively speaking, it is better to directly traverse the data submitted by the form. Modify the above code to:
Problem solved. Note that if the form is submitted by post, just traverse the post. |