Support » Plugins » Hacks » INSERT fails when done with Ajax

  • 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?

  • The topic ‘INSERT fails when done with Ajax’ is closed to new replies.