Welcome Guest, Not a member yet? Register   Sign In
how to share SESSION with WP
#5

(This post was last modified: 03-27-2018, 02:55 AM by ardavan.)

Hey Bob, thanks for your reply,
So if you have done the opposite way, that means I can do another way around.
basically, my microsite is a user management for the WordPress website and will generate some session that can use in the WordPress(of course there will be some hard coding in the WordPress header.php).

My question is if the session works on a domain, so I can get the session in a plain PHP code right?

what I am thinking is to generate a session in plain PHP (in the microsite - CI) and then call that session in plain PHP (in the WordPress - header.php)

set on CI
PHP Code:
// http://www.website.com/cp/
$this->session->set_userdata('some_name''some_value'); 

call it on WP header.php
PHP Code:
// http://www.website.com/ 
$_SESSION['some_name']; //some_value 

how can I do this? I mean that is my first time and idk how to make this to happen.

any idea?

(03-26-2018, 08:38 PM)visualsol Wrote: Hi Ardavan,
I've done the opposite way, I've utilized the Wordpress login and sessions and then referenced the sessions on the CI side.
It works, but it pulls in more of the WordPress side functionality than I would like, and you have to be careful when Wordpress major updates happen.  If that is of interest to you, let me know.
Bob

(03-26-2018, 02:19 AM)ardavan Wrote: Hi, everybody,

I'm working on a microsite in CI and this microsite will generate some session data.
on the same Host & domain, we have another website with is WordPress.

I would like to make use of CI session generate in Wordpress website. Confused

Is it possible to do so?  Huh
Please show me the correct approach.  Smile

Thanks in advance
Reply


Messages In This Thread
how to share SESSION with WP - by ardavan - 03-26-2018, 02:19 AM
RE: use CI session on microsite like wordpress - by ardavan - 03-26-2018, 11:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB