Title: [writing a plugin] wordpress undefined function
Last modified: August 19, 2016

---

# [writing a plugin] wordpress undefined function

 *  [surferbloggy](https://wordpress.org/support/users/surferbloggy/)
 * (@surferbloggy)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/writing-a-plugin-wordpress-undefined-function/)
 * hello, I’m making a plugin for wordpress, It always happens the same problem 
   with the wordpress plugins that when I load with ajax echo text from a php page(
   called directly) gives me error on wordpress functions, they are undefined: when
   the call is directly the php page is seems to be outside wordpress
 * even if I do include the main file of the plugin gives me errors eg. on get_option(‘
   siteurl’), has happened to someone? how can I solve it?
 *  I have to do this: filling out a registration form if user is already registered
   when he enter his email and password the form is all filled with ajax, ajax is
   working but I can not get the other fields in the db because it gives me error
   on
 * Call to a member function get_results () on a non-object
 * although if there is
 * global $ wpdb;
 * coul you help me??than you

The topic ‘[writing a plugin] wordpress undefined function’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [surferbloggy](https://wordpress.org/support/users/surferbloggy/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/writing-a-plugin-wordpress-undefined-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
