jQuery Ajax returns the whole page

前端 未结 6 1887
执念已碎
执念已碎 2020-11-28 10:52

I have a jquery-ajax function that sends data to a php script and the problem is with the return value, it returns the whole page instead of single value.

Thank you

6条回答
  •  自闭症患者
    2020-11-28 11:45

    Use condition to verify if $_POST empty in you main page or index.php to not send the whole page in response ajax

    
    
    //
    
    the header pages
    the body
    the include pages
    the scripts pages
    the footer
    
    

提交回复
热议问题