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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:02:05+00:00 2026-05-26T06:02:05+00:00

Problem After downloading a CSV once, the form does not send a request on

  • 0

Problem After downloading a CSV once, the form does not send a request on submission.

Purpose: To download a CSV file of information after choosing a few criteria for the download.

PHP Scripts:

export.php displays a HTML Form allowing the user to select certain criteria (which basically sets a couple of variables and then submitting those criteria in order to download the CSV file.

exportEntrants.php uses those variables set by the form to retrieve the appropriate data from the database, create the CSV data and then provide it as a download to the user.

So in export.php we have the following snippet:

require_once 'exportEntrants.php';
if(/*the form is submitted*/){
    export($criteria);
}
else{
    // Display the HTML Form
}

Which successfully calls the exportEntrants.php script when the form is submitted the first time.

Then in exportEntrants.php the data is created correctly and downloaded using:

function download($content,$title) {
        header('Content-Description: File Transfer');
        header("Content-type: application/csv");
        header('Content-Disposition: attachment; filename="'.$title.'.csv";');
        echo $content;
        exit();
    }

After which, the download works fine, and the CSV is correct. However on-screen the form is still visible to the user, so clicking the Submit button once more should trigger the if statement described above and allow me to download the file again with the same or different criteria as I see fit.

This doesn’t happen though, nothing happens. The form is still displayed on screen, nothing has changed on screen at all, but submitting the form does not reload the page or cause any action.

Can anyone see what could be causing this problem? I will provide any additional information as needed.

Thank you.

EDIT in response to Comment from Hakre below.

  • Disabling Javascript made no difference.

  • This issue has been tested in Firefox 7.0.1 and Chrome 14. I have not yet tried IE or Safari.

  • The HTML of the form is as follows (I haven’t included the criteria parts of the form as they work fine and the form is generated by a rather complicated function so it’s not a small piece of HTML (lots of divs and spans):

    <form action="/admin/export/export.php" method="post" name="exportForm" onsubmit="return formSubmit()"><input type="submit" name="submit_butt" value="EXPORT" class="button"></form>

  • 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-26T06:02:05+00:00Added an answer on May 26, 2026 at 6:02 am

    The fact that the request is not being sent, when you press button repeatedly, seems to indicate an issue in client side. Check the formSubmit() function or page source of the client-side and see if maybe the attachment download somehow messed up Javascript.

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

Sidebar

Related Questions

I am facing problem with the control flajaxian.FileUploader i.e. after downloading the dll file
I generate a *.csv file with PHP and it works great. The problem is,
Hello guys am having a problem with downloading modules. Anytime i try to download
I have the following code for managing file download through django. def serve_file(request, id):
Weird problem: After rotating my app to portrait, picking the toolbar item and exposing
I have a problem after i setup windows 7 all old projects in c#
I'm now making unit-tests for already existing code. I faced the next problem: After
I have this problem where after a field (say Field3 in table MyTable) is
I have a weird problem where after setting nocheck on a foreign constraint and
I'm having the weird problem that after having javascript inject some dom-elements the css-rules

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.