I want to implement ajax on a page . i create a folder under plugins and put php page there and it works(when i gave the correct path in jquery). But when i try to call any WordPress functions it gives me error .
I want to do some database fetching in that file . How and where should i put the php file for simple ajax implementation ?