Warning: trim() expects parameter 1 to be string, array given in php script

前端 未结 2 1615
生来不讨喜
生来不讨喜 2021-01-16 06:40

i have php script, when i executed this code, i got warning

Warning: trim() expects parameter 1 to be string, array given in home/public_html

2条回答
  •  萌比男神i
    2021-01-16 07:09

    It appears the error is in your html and not in the php.

    If $_POST['First_Name'] is an array while it should not be, it is likely your html looks something like:

    
                           ^^ here, remove this
    

提交回复
热议问题