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

  • Home
  • SEARCH
  • 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 7799729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:24:24+00:00 2026-06-02T00:24:24+00:00

I am using a feature of popup box in my project. When a user

  • 0

I am using a feature of popup box in my project. When a user come to the site a popup box apears on the top of the page hiding the rest of the content. In that popup form the user has to give a download key. if the user has the key he can go forward otherwise he cannot see anything else. When the user provide the key he goes to the main page.
Now the problem is once the user comes to the main page after providing the key and when he clicks again on the header again the page is reloaded and again tht popup form comes. How can I prevent it to apear again if some user has already given the download key . I am using php with code igniter. My code

<?php if($download_key != null && !isset($_POST['popup'])){?>
    <script type="text/javascript">
        $(document).ready(function(){  
                loadPopup();    
        });  
    </script>
<?php } ?>

downlaod key is database column and popup is a hidden input that is set when the form is submitted on the popup box.
The form that appears on popup box is as

<form name="form" method="post" onsubmit="return validateForm('<?php echo $download_key ?>')"> 
 <div style="width:530px;">
     <input style="display:none; height:25px;" id="downloadkey" name="downloadkey" type="text" />
     <input style="display:none;" type="submit" id="submit" name="submit" value="<?php echo $variable['QUESTION_BUTTON']['value']?>"/>
  </div>
</form>

Any ideas ?

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-06-02T00:24:25+00:00Added an answer on June 2, 2026 at 12:24 am

    You should have a session_start() at the beginning of pageload

    EDIT: changed a bit

    session_start();
    
    //check if key has already been seen:
    
    if(isset($_SESSION['download_key']) && $_SESSION['download_key'] != null ...
    
    // then if not check if the key is submitted
    
    else if ( isset($_POST['popup']) ... // and other checks
    
       // set session variable
       $_SESSION['download_key'] = $key;
    
    else
    
       // load the ask for key page
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the i18n feature of Django. I have noticed that even though I
I have a page in my application that refreshes some content (a list of
I'm trying to implement the following jQuery popout feature on my site: http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/ I
I am using autocomplete feature in jquery to show the users list intellisense. for
OK i want to implement the searching feature using mysql. Now to do this,
In my website I have implemented search feature using full-text search. It works fine
How can implement reordring in winforms datagridview by using the feature of drag and
I'm currently using Socket.IO with redis store. And I'm using Room feature with it.
I am using the autocomplete feature of jQuery UI to create a passive database
I have been using the new feature of Spring 3.1.1 the java based configuration.

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.