WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help in Saving in Database (3 posts)

  1. mashemaru
    Member
    Posted 2 years ago #

    Just want to know if I have an error in my code, everytime i run my code i get an error of Fatal error: Call to a member function insert() on a non-object in *.php on line 41

    here is my code http://pastebin.com/XnLLsjLd

  2. bcworkz
    Member
    Posted 2 years ago #

    Include the global $wpdb; line inside any function that uses the object.

  3. mashemaru
    Member
    Posted 2 years ago #

    Thank you I managed to fix it by adding wp-load.php also. Thanks btw.

Topic Closed

This topic has been closed to new replies.

About this Topic