I'm trying to use the $wpdb->get_var() function, and am getting this error
Fatal error: Call to a member function get_var() on a non-object in /home/ninnypan/public_html/beta/form_logic.php on line 10
I've use the function on regular WP and have never had any problems. Any Ideas on what my problem could be?
My code is:
$usr = $wpdb->get_var("SELECT count(*) FROM $wpdb->users WHERE user_login = '$username'");