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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:36:39+00:00 2026-05-17T16:36:39+00:00

Ive been struggling with this for a day or two. Not just the coding

  • 0

Ive been struggling with this for a day or two. Not just the coding but explaining the situation precisely. I have a static form on a page, “download-registration.php” when you submit the form (validated CS and SS) it then takes you to “download-software.php” where you can well, download the software. I do not want “download-software.php” to be accessible from anywhere but “download-registration.php” and ONLY after you submit the form. This is the problem I was having with a session based restriction, you could go to “download-registration.php” and alter the url to get to the download page.

I think I need to create a variable (random 1, 65335)? insert that value into a hidden input on click and make sure it matches to a value on the “download-software.php” page?

How do I go about this? does it need to be done this way or is there a better way? Any help is much 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-05-17T16:36:39+00:00Added an answer on May 17, 2026 at 4:36 pm

    Make whatever you have that processes the form you want to force them to submit also add a variable to the session. Then check to see if that variable is set on the download page.

    My guess is that with your earlier session-based approach you were setting something in the session when the form was loaded, but you need to do it when you process it instead if you want to make sure they submit it first.

    Edit:

    display_form.php:

    // ... display the form, you don't need to set any $_SESSION here ...
    

    process_form.php

    session_start();
    
    // ... process the form ...
    
    $_SESSION['form_processed'] = 1
    
    // ... redirect to download page ...
    

    download_page.php

    session_start();
    
    if($_SESSION['form_processed'] != 1) {
        // user never submitted form, reject them ...
    } else {
        // user submitted the form, show them the download page
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a snippet to create a 'Like' button for our news site: <iframe
I am attempting to pull some information from my tnsnames file using regex. I
I've found several jQuery syntaxes for nullifying the enter on a form. First one:
I'm trying to write test harness for part of my Android mapping application. I
I'm trying to build a C++ extension for python using swig. I've followed the
Every time that I want to do a Layout, I'm getting a black layout

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.