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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:23:45+00:00 2026-05-12T14:23:45+00:00

I am developing a page whereby users can login and demo some pieces of

  • 0

I am developing a page whereby users can login and demo some pieces of functionality. I only want to allow the user to demo this once per day.

A small example:

I have a web page with 3 buttons (relating to 3 different scenarios). On page load, I look up the database and check if the current logged in user has run any one of the 3 scenarios available (via an audit table). Each button is enabled/disabled based on the results. If any buttons are enabled, then they have not run that demo yet. By clicking the relative button, the demo runs a record is written into the Audit Table, and the button is disabled.

This was working ok, however, I realised that when I refresh the page (and confirm I want to re-submit the information) the demo runs again.

How can I stop this from happening? I need to only allow the user to run the demo once!

Thanks.

  • 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-12T14:23:45+00:00Added an answer on May 12, 2026 at 2:23 pm

    I would suggest that you change your form submission to use the Post/Redirect/Get pattern to avoid a resubmission if they hit refresh on the demo page.

    Also, it seems like you should just be able to change the code at the point where it writes the record into the audit table to check to see if the record already exists, and if so, return a different result. I’d be pretty wary about this approach though. The “refresh” functionality of the browser isn’t generally something you should be trying to prevent. What happens if a user hits “refresh” in the middle of their demo?

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

Sidebar

Related Questions

I'm developing a page using the jQuery sparklines plugin. This plugin replaces some CSV
I am developing an ordering page in PHP for some products. The user needs
I'm developing a web page using django and I want to add some javascript
M developing an application which starts with a login page. After loggin the user
I am developing a web-page in PHP that needs following functionality: 1. When User
Hope some one can answer my question. I am developing a web page with
I'm developing a page that will present the user with a content slider, so
I'm developing web page which has main file index.php as follows: include('UserClass.php'); include('html/top.php'); $user
I'm developing a Facebook Page Tab app where a user will be drawing on
I'm developing a FB page tab app, and I want to provide my client

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.