PHP white screen of death every time. What am I doing wrong?

前端 未结 5 454
傲寒
傲寒 2021-01-26 08:44

I\'m a complete noob to PHP and working with mysql so you know I do however have a great deal of experience with HMTL and CSS. All I need is for a form on my site to upload the

5条回答
  •  南方客
    南方客 (楼主)
    2021-01-26 09:32

    Like the other guys said, put the comments in the array reference. That being said you really need to escape the $_POST variables to avoid SQL Injection, its also easier to debug if the code is clearly ordered :)

    With ordered code you can type echo "some text"; at any touch point you want to so you can see where the code breaks.

    Also switching on error reporting in your php.ini or in code (http://php.net/manual/en/function.error-reporting.php) would be the best bet for watching the errors that you can't predict.

    
    

提交回复
热议问题