Forum Moderators: open
Concerned I'd missed something, I tested it.
<?php
header("content-type:text/html");
if (isset($_POST['submitted'])) {
// do all your other stuff here - send email,
// store in database, whatever - then
echo "<p>Download will start.</p>";
header("Location:test.zip");
}
else {
echo '
<form method="post" action="test-dl.php">
<input type="hidden" name="submitted" value="1">
<input type="submit" value="Submit and Download">
</form>
';
}
?>