This is quite difficulty for me. Please help. I've a website created with cake PHP in root domain (say mysite.com) and a blog in a directory called "blog" (mysite.com/blog). I have a register/login feature in PHP site. So what I want here is, whenever a member login in the main site using the login form, whenever he open the blog (mysite.com/blog), he shoulb be as logged in as the same user logged in the main PHP site. In the same way, whenever a new user sign-up with the registration form in the main PHP site, he should become an user in the wordpress blog.
Thanks.
To login the user automatically for wordpress, check out:
http://codex.wordpress.org/Function_Reference/wp_signon
To create a user take a look at:
http://codex.wordpress.org/Function_Reference/wp_create_user
In your main site, you have to include WP's functions by using wp_signon
And then, you can auto-login a user in WP by using
This should work fine, I hope this helps you.