WordPress.org

Ready to get started?Download WordPress

Forums

INSERT fails when done with Ajax (1 post)

  1. I'm building a simple email subscription form and using ajax to call the function that stores the email in the database.

    If I do it without ajax, everything works perfect, but the moment I try and use ajax to process the request, I get this error:
    Fatal error: Call to a member function query() on a non-object
    I have looked every where and cannot find a solution.

    This is the function that stores the address:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    As I said before, everything works perfect if I don't use ajax, but with ajax, the Fatal Error pops up.

    Ideas, please?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Pippin Williamson
  • This topic is not resolved
  • WordPress version: 3.0.1