I’ve been toying around with setting PHP sessions in a script called by Ajax. Couldn’t really find an easy solution easily on the web so I thought I’d post my solution here. It’s stupidly simple: before setting the session in the AJAX called script, make sure to call session_start()
As usual, once I figured it out, I laughed and poked fun at myself for not thinking of it sooner, but that’s how it goes.
