Use cookies? Sessions? database? I dont know!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Post by swirlee » Tue Aug 26, 2003 1:40 pm

Using an ordinary cookie will work if you want the option to be available to all users, including ones who aren't signed on. Use setcookie() and getcookie() to store and retrieve the setting. If you want it only to work for users who are signed in, then you can just get the city information from their account information in the database.

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Post by swirlee » Tue Aug 26, 2003 1:55 pm

AND is &&
OR is ||

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

cookie implementation

Post by ruturajv » Tue Aug 26, 2003 10:35 pm

One common problem may be you are trying to get the cookie before it is set,

Once the cookie is set, take the user again to the page where information is to be displayed

sigix
php-forum Active User
php-forum Active User
Posts: 364
Joined: Mon Jul 14, 2003 9:39 pm
Location: /Earth/Xion

Post by sigix » Tue Aug 26, 2003 11:18 pm

after getting the new values from user you have to set cookie again to to show data on that values :!: :idea: :arrow:

User avatar
tryton
New php-forum User
New php-forum User
Posts: 49
Joined: Wed Jul 09, 2003 8:25 am
Location: Joze
Contact:

Post by tryton » Wed Aug 27, 2003 6:54 am

Checked your website joker and it looks like its working today.

Post Reply

Who is online

Users browsing this forum: AdoptiveSolution and 1 guest