php parse Syntax error T

This question already has an answer here:

  • syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING 4 answers
  • PHP parse/syntax errors; and how to solve them? 13 answers

  • To solve your current issue, remove the single quotes from your $_FILES array:

    mysqli_query($db_connect, "INSERT INTO `product` (`pname`, `pid`, `disc`, `price`, `size`, `tage`, `remarks`, `catid`, `img1`, `img2`, `img3`)
                    values('$_POST[pname]','$_POST[pid]','$_POST[pdisc]','$_POST[pprice]','$_POST[page]','$_POST[prem]','$_POST[psize]' ,'$_POST[pcat]',
                    '$_FILES[img1][name]','$_FILES[img2][name]','$_FILES[img3][name]')");
    

    To solve your main problem, read this.

    链接地址: http://www.djcxy.com/p/69942.html

    上一篇: 哪个更好的选择,使用Map或For循环?

    下一篇: php parse语法错误T