Is anything wrong with my code here?

This question already has an answer here:

  • The 3 different equals 4 answers
  • unexpected error message in php form (SQL syntax error) 3 answers

  • The problem is that you have specified the assignment instead of comparison in the following line:

    if ($post_title=='' || $post_keywords=='' || $post_content='' || $post_author=='' || $post_summary==''){
    

    Change $post_content='' to $post_content == ''


    你的错误在这里$post_content=''如果条件应该是$post_content==''在这种情况下,你设置这个var $ post_content为空字符串,所以它将在数据库表中为空。

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

    上一篇: 未捕获的错误:不能使用WP类型的对象

    下一篇: 我的代码在这里有什么问题吗?