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 7596349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:53:51+00:00 2026-05-30T21:53:51+00:00

I am creating a site on which content will be stored for several different

  • 0

I am creating a site on which content will be stored for several different magazines. Users will use a question and answer to gain access to the magazine.

Once they’ve been granted access, I would like them to continue to have access for a set period of time.

I’m thinking a database table could store cookie_id, issue_id and expiration. When a user accesses their first issue a cookie is stored on their computer containing a new, unique id. That unique ID, the issue id for the content they just accessed, and the expiration date get stored in the database.

If they access another issue, a new database entry is created but the cookie id is re-used.

When they return to the site the cookie is used to pull all related database entries and allow the user to re-visit any of those articles until they have expired.

Is there a smarter way of doing this?

Thank you in advance!

  • 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-05-30T21:53:52+00:00Added an answer on May 30, 2026 at 9:53 pm

    The problem with cookies is that they can be erased or corrupted (both unlikely but possible).

    However, your solution is basically what I would do.

    Here is what I would do…

    when they login a cookie would be set with their userid (could be encrypted if desired). I wouldn’t use any conglomeration of dates/times/random values because these values most likely be different each time the user returns.

    On subsequent pages check to see if the cookie id is set (possibly save a database query – if you don’t need to pull additional user info – and thus reduce load on the server).

    I would use a database table and use their userid as the reference for further access to get previous issues read. If there are (or will be) a lot of users consider putting all info into one record in the database and inserting data in a specified format such as issue1:date1, issue2:date2, etc. this will only require 1 db query to update to add, update and/or delete entries.

    However, for this I might seriously check into HTML5’s local storage solutions – I haven’t checked into using this yet or how well it is supported.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an site which allows users to upload photos. It's a linux server.
I'm tasked with trying creating a site which will create custom HTML templates. The
I am creating a site which will have a desktop and a mobile theme.
I have a site which allows users to make changes to content. How can
I'm creating a multi-tenancy web site which hosts pages for clients. The first segment
I am creating a voting system for a Q&A site project in which if
I'm creating custom forum software for a site I'm building, which includes 2 tables
I'm creating a site that allows users to submit quotes. How would I go
I'm building a content-managed site with a homegrown API built by several developers I
I'm creating a site using drupal where I'd like to prompt my new users

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.