I am using wordpress and I normally use:
if (!is_user_logged_in()){
//something here
}
to detect if the wordpress user is logged in or now.
My problem is that I need to detect if the user is logged in to wordpress from a non-wordpress page.
My page is in the same directory as the other wordpress pages but is not page of wordpress.
How can I detect this from my page?
Simply place
on to of your template files (before everything else). This loads the whole WP core.
this is untested by me, but please have a look at this article: Integrating WordPress into an Existing Site
In essence I believe that if you use:
..at the top of you (php) page you should be able to take advantage of the is_user_logged_in() function.