Hi all,
I am trying to create a scenario where a user can click to add an item to their item shortlist (or favourites). I would like the shortlist to be viewable on the same page and for the page to auto refresh to show the added item when they click.
I have got pretty close with 2 soloutions but neither are ideal.
Solution 1:
Upon submit button click, user gets sent to new page where cookies get set & a confirmation message 'added to favourites' is displayed but users need to click on back browser button to see the new item added to the first page (I have set first page to
header("Cache-Control: no-cache");
so that when i return it picks up the new cookie & displays it. This solution is not ideal because it sends users to a new page & they need top click back.
Solution 2:
Upon submit button click, form action is referred to same page as form with cookies getting set in header. However the page needs to be refreshed again before I can view the added favourite (although subsequent added favourites only require one button click). Again I am not happy with this as it requires a manual refresh.
Does anyone know if it is actually possible to acheive what I am trying to?
Unfortunately I am having a problem using Sessions with my host so at the minute I am pretty much restrcited to using cookies.
Any help much appreciated. I can paste the code if necessary.
Thanks in advance
Col