Ajax Contact Form with Attachment...
  • Sorry Request must be Ajax POST (error)

  • Asked by Namrata on 17th Aug 2018

When form submitted it shows the message as--> Sorry Request must be Ajax POST. Please let me know the issue and solution for it.

    Add Answer

    1 Answer

      • Saran

      You can simply find and remove the code below in PHP file, it is only used to detect if the request was made via ajax:

      • 1
      • 2
      • 3
      if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') { die('Sorry Request must be Ajax POST'); //exit script }

      Can You Answer this? Help us answer the question!

        • Answer
        Supports basic Markdown syntax.