Use cookies? Sessions? database? I dont know!

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

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

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.
Image

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

Tue Aug 26, 2003 1:55 pm

AND is &&
OR is ||
Image

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

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

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:

Wed Aug 27, 2003 6:54 am

Checked your website joker and it looks like its working today.
JCCorner.com - Online marketplace including online mall, link trading post, web articles and community board.

Post Reply