StrangerInBeijing
Aug 20th, 2008, 04:46 AM
As you can see on this site's (http://www.thatsglobal.com/) "Location Selection" bar (whre you can drill down from your continent>country>region>city) I use Ajax and PHP to get and display the data from the database.
The idea is users' dont have to go all the way down to city. If select a continent all items for that continent will become available (not shown now), same for region.
So I'd like to store the user's last continent, country (if any), regin (if any) and city (if any) in a cookie and jump to that on the next visit.
However it seems if i set a cookie in the PHP script that are used by the ajax coding it does not work. nor does session.
Anyone ran into this kind of problems?
ps: if you look at the controls, note only cities for Asia>China and Africa>South AFrica Regions are available.
The idea is users' dont have to go all the way down to city. If select a continent all items for that continent will become available (not shown now), same for region.
So I'd like to store the user's last continent, country (if any), regin (if any) and city (if any) in a cookie and jump to that on the next visit.
However it seems if i set a cookie in the PHP script that are used by the ajax coding it does not work. nor does session.
Anyone ran into this kind of problems?
ps: if you look at the controls, note only cities for Asia>China and Africa>South AFrica Regions are available.