-3
It is possible to recreate a $_SESSION
in PHP
without dislocating the user?
I have a restricted area where he can update some of his information in the database.
The problem is that when he logs in I create some sessions to use this information during his browsing. For example, his photo ($fotoUser = $_SESSION['fotoUser'];
), the path of this photo is recorded in the database, and when it updates it, I update the path in the database and delete the old image in the folder to avoid accumulating images that are not being used, until then everything working right.
The problem is that after he updates the photo or some given as his name, if he gives a CRTL+F5 or even F5 to refresh the page, the photo simply becomes null, because the path in it is from SESSION
created at login time, so it does not take the new image. It has to recreate the session without undoing it, or some different alternative?