PHP Sessions and Passing Session ID
- by Jason McCreary
I have an API where I am passing the session id back and forth between calls. I set up the session like so:
// start API session
session_name('apikey');
session_id($data['apikey']); // required to link session
session_start();
Although I named my session and am passing the session id via GET and POST using the name, PHP does not automatically…