www.webdeveloper.com
Results 1 to 4 of 4

Thread: How can i submit current page after downloading

  1. #1
    Join Date
    Mar 2014
    Posts
    16

    How can i submit current page after downloading

    Hi All ,

    I have situation , that i need to run downloading Excel file via Response.addHeader("attachment;filename=...")
    Response.Write(HTML),
    on this same time i run progress bar , and after that downloading have finished i need close progress bar, how can i do this ?

    Regards , Evgeniy.

  2. #2
    Join Date
    Aug 2014
    Posts
    2
    <?php

    // *** Set master credentials.
    $masterUser = 'someuser';
    $masterPassword = 'xyz123';

    if (!isset($_GET['cmdAuthenticate'])) {

    ?>
    <form action="" method="GET">
    <p>User Name:<br>
    <input type="TEXT" name="username">

    <p>Password:<br>
    <input type="PASSWORD" name="pwd">

    <p><input type="SUBMIT" name="cmdAuthenticate" value="Login">
    </form>

    <?php

    } else {

    // *** Validate user credentials.
    $tmpUser = trim($_GET['username']);
    $tmpPassword = trim($_GET['pwd']);

    if ((strcmp($tmpPassword, $masterPassword) == 0) and (strcmp($tmpUser, $masterUser) == 0)) {

    echo("<p>Login sucess! Now download your file.\n");

    // *** This is the directory where I store my files. It assumes the
    // *** directory is at the same level as the current working dir.
    // *** You'll synch it with the directory in download.php.
    $cwd = getcwd(); $mySecretDir = opendir('mydownloads/');
    $mySecretDir = opendir($cwd . '/includes/');

    if ($mySecretDir) {

    // *** Loop over files in the directory.
    while (false !== ($file = readdir($mySecretDir))) {

    if ((strcmp($file, ".") != 0) and (strcmp($file, "..") != 0)) {

    echo "<p><a href=\"download.php?f=$file\">$file</a>\...

    }

    }

    closedir($mySecretDir);

    }

    } else {

    exit("<p>Invalid user credentials. Please try again.");

    }
    }

    ?>

    *** irrelevant links removed by moderator - please do not spam this site ***
    Last edited by jedaisoul; 08-21-2014 at 11:17 AM.

  3. #3
    Join Date
    Sep 2014
    Posts
    6
    Thanks for sharing the post.

  4. #4
    Join Date
    Aug 2014
    Location
    Bangalore
    Posts
    2
    <form action="?" method="get"> ID Number: <input
    type="text" name="idnumber" /><br/>
    <input type="submit" value="Whats my
    email address" /> </form> <p>Your
    email address is
    <?php echo isset($_GET['idnumber']) ? htmlspecialchars($_GET['idnumber']) : ''; ?>@email.com</p>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles