Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9249315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:09:32+00:00 2026-06-18T10:09:32+00:00

I have a website where my landing page could send the user to one

  • 0

I have a website where my landing page could send the user to one of our locations. I am wondering if there is a way to store their location choice and redirect them to the correct location based on information I stored. I have seen this before on a lot of store pages where they keep and let you browse your local store. Would a cookie be the best way to store this information?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:09:34+00:00Added an answer on June 18, 2026 at 10:09 am

    Cookies would be perfect for such a situation. Simply record the location id and then redirect to that place next time!

    // store an array of location cookie names and there location values
    $places = array('us'=>'/united-states.php');
    
    // After user chooses a location, store the cookie based on his choice: in this case, us!
    setcookie('location','us', time() + (3600 * 24 * 7));
    
    // On a new page check the cookie is set, if it is then redirect users to the value of that cookie name in the array!
    if(isset($_COOKIE['location'])){
        header('Location: '.$places[$_COOKIE['location']]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On a classic ASP website I'm maintaining, on our landing page we have a
I have a landing page in a website, where there is just a single
I'd like to have our user landing web-server POST XML to our computation web
I have website that shows user submitted content in 30+ languages in front page,I
I have a website as the landing and information page to a web portal
I have website, usually all looks fine but sometimes one div is on the
I have website where users can login with their Facebook account. I am using
i have website of application which sells applications online.on the home page i want
I have a problem how to store some data in mysql. I have website
i am calling iframe on html page within it i have website url, i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.