hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Cookie System?
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Cookie System?

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-03-2004, 06:01 AM
adaml adaml is offline
Web Hosting Guru
 
Join Date: Oct 2002
Location: York, United Kingdom
Posts: 260

Cookie System?


Hey guys,

I was wondering if anyone knows how to make my site so that it is like

UPS.com as you select the site you would like (your country) and then

when you go to that page you can click a button that says make "Start

on this page the next time you visit UPS.com." and it sets a cookie

that makes it whenever i go to www.ups.com it goes to the United

Kingdom section without visting the country select page.

How can i make this cookie system work for my site?

Thanks

Adam

__________________
adamlivesley
http://84degrees.com

Reply With Quote


Sponsored Links
  #2  
Old 07-03-2004, 02:04 PM
Barti1987 Barti1987 is offline
Web Hosting Master
 
Join Date: Mar 2004
Location: USA
Posts: 4,342
Easy...

Make a form with the list... then when the user submits you make a cookie with the country ID, if the checkbox is selected else just dirct them to the coutnry without making the cookie.

Then on the same page before even loading, check if the cookie value exist, if it does redirect to the country id in the cookie .

Peace,

__________________
Testing 1.. Testing 1..2.. Testing 1..2..3...

Reply With Quote
  #3  
Old 07-03-2004, 07:26 PM
adaml adaml is offline
Web Hosting Guru
 
Join Date: Oct 2002
Location: York, United Kingdom
Posts: 260
How could i do this code? Is there any place to get this in a tutoiral or something as i havent a clue about cookies only know how to set them?


Adam

__________________
adamlivesley
http://84degrees.com

Reply With Quote
Sponsored Links
  #4  
Old 07-03-2004, 08:09 PM
barrywien barrywien is offline
Aspiring Evangelist
 
Join Date: May 2002
Location: Durham - UK
Posts: 445
Quote:
if ($checkbox=="1"){
setcookie("Country", $country);
}
That would do it, you then need to setup the redirect something like index.php?country=$country or by using another if else statement.

You can read about setting up cookies in a little more depth here: http://uk.php.net/manual/en/function.setcookie.php

__________________
Barry
UK Based Freelance PHP Developer
PHP/SQL/Ajax/HTML5 - Contact for Quote

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
The Host Group Launches Web Hosting Affiliate Partner Program Web Hosting News 2012-11-20 11:31:43
New Heart Internet Feature Helps Customers Sell Unwanted Domains through Control Panel Web Hosting News 2012-09-05 15:17:37
UK Web Host Heart Internet Offers New Version of Serif Web Builder for Free Web Hosting News 2012-05-30 16:13:47
New UK Cookie Law Impacts Customers - What About Hosts? Web Hosting News 2012-05-28 14:16:07
LinkedIn Access Cookie Opens Users to Security Breaches, says Security Analyst Web Hosting News 2011-05-24 14:19:01


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?