Hey all,
I'm a beginning PHP-using webdesigner, and me and my partner almost finished our first site.
But we just stumbled upon a little problem. We have a gallery with multiple pages and of course multiple photos per page. It all seemed to be running fine until we noticed the pictures don't change when you change pages. They only appear when you refresh a couple of times - or a couple of hundred times.
Now I know the images are just 'stuck' in cache and that you can easily solve it with session_destroy(); session_start();, but here's my problem.
In order to view the photos, you have to be logged in. Adding a session restarter to the gallery causes you to log out again, thus disabling you to view the images.
So, how do I solve this problem? Is there a way to refresh the images without logging out, or is there another way to remember that the user is logged in?
The code I used for the login is $_SESSION['logged_in'] = true;
I'm a beginning PHP-using webdesigner, and me and my partner almost finished our first site.
But we just stumbled upon a little problem. We have a gallery with multiple pages and of course multiple photos per page. It all seemed to be running fine until we noticed the pictures don't change when you change pages. They only appear when you refresh a couple of times - or a couple of hundred times.
Now I know the images are just 'stuck' in cache and that you can easily solve it with session_destroy(); session_start();, but here's my problem.
In order to view the photos, you have to be logged in. Adding a session restarter to the gallery causes you to log out again, thus disabling you to view the images.
So, how do I solve this problem? Is there a way to refresh the images without logging out, or is there another way to remember that the user is logged in?
The code I used for the login is $_SESSION['logged_in'] = true;