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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:20:12+00:00 2026-06-15T00:20:12+00:00

Im doing a quiz (php and mysql) for some students, the quiz is based

  • 0

Im doing a quiz (php and mysql) for some students, the quiz is based on a video they have to watch..

the order is this..
1)they enter a unique web page for every user
2)access a page with a video for the user to watch…
3)on the bottom of the page there’s a button “Answer Quiz”
4)When they click the button, they are send to a page with the quiz

Here’s where the problem happens, i want to prevent the user from watching the video again, but when they hit the back button, well there’s the video again for them to watch

im blocking the video in a video table in mysql db, but the video is cached or something, so this is not the approach of preventing the user to watch the video again when hitting the back button…
.
any ideas of how to achieve this??

any help appreciated……

  • 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-15T00:20:14+00:00Added an answer on June 15, 2026 at 12:20 am

    Checking from your latest comment, I would assume that you have a table, expired_quizzes with at least three columns, quiz_id, quiz_filename and the boolean is_active. I would also normalize the table to a userid as well, so if user A views it and takes the quiz, user B can still see the video (makes cheating with a friend easier, though). It is hard to know exactly what is going on without seeing any code or structure, but try checking a couple of these things:

    If you look up the quiz based upon a search, and the webpage uses a variable $_GET, then anytime the webpage is visited, it will always load the quiz. So considering:

    http//www.yourwebpage.com/?quizfilename=viewablequiz.mp4

    Depending upon your PHP instructions, it will always load viewablequiz.mp4. There are two recommendations to prevent it.

    • Don’t load $_GET['quizfilename']. Rather load $_GET['quizid'] and recall the filename from the query with additional search parameters, such as:

      ‘SELECT * FROM expired_quizzes
      WHERE quiz_id='{$_GET[‘quizid’]}’ AND is_active=1
      LIMIT 1;’

    Then, return row['filename'] in your PHP code, or handle with a response to the user if no results are found (no unexpired quizzes).

    • Load the video via AJAX. Use a similar query on the PHP side as mentioned above, but since it requires a look-up after loading, a refresh of the screen will not load anything.

    To prevent cheating, you should probably also have another table which records every time the video is viewed, with a timestamp and userid. It can help detect a cheating attempt later by seeing who was testing and viewing at the same time.

    Of course, always protect against SQL injection and don’t put user input directly into the SQL statement.

    For a more detailed analysis, you should post just the relevant PHP, HTML and SQL within the question.

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

Sidebar

Related Questions

I'm doing this one using PHP. I'm doing some basic quiz application and it
I have this question in my online QUIZ since i am doing my degree
Doing some SOAP calls to a 3rd party application. They provide this soap header
Doing some work in javascript I have a multidimensional made up in this format
Doing some jquery animation. I have certain divs set up with an attribute of
I am doing a quiz , in that I have 3 activities Question1 ,
I have been working on the app engine for some time, and this problem
i have a module that needs to save a solution(for a quiz) value. This
So I have this one quiz on my page, that tells the user what
I am building a small quiz/test engine with AJAX, PHP, and MySQL. All of

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.