Hi guys, I am new here. I am trying to implement my site with saving session data to a MySql table but it is not working. I passed all day yesterday trying to make it work with no success. It works find the normal way using files.
This is the code I am using.
I have looked everywhere on the net and they all come back to the same code so I use this example. Of course I have changed the necessary data to reflect my db name and user information.
My problem is that the read function gets called but the write function doesn't seem to get called. To test this I entered data in my sessions table manually using PhpMyAdmin. I made sure the session id is the same as the one used when I load my page. I then echoed the data just before exiting read and I see my data so I know read works properly. According to what I read on the net, I cannot echo or print from within _write, so to test it I changed the update statement to update another table of my db with some basic values. This table gets updated all the time somewhere else in my code so I know it works but in that function it does not update also.
I am pulling my hair out with this. What is wrong? Can somebody help me with this? Help would be much appreciated.
Thanks!