Is it possible to set PHP session variables using Javascript?
If you want to allow client-side manipulation of persistent data, then it's best to just use cookies. That's what cookies were designed for.