Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do you pause until a certain action occurs? How to use check boxes?

    Okie Dokie, firepages has a great, great script that I am using, but I need to configure it and I am terrible with PHP. This is the script by the way if it will help answer my questions...

    http://www.firepages.org/public/zipfile.php.txt


    I added in
    system( "del \"$zipFile\"" );
    but it deletes it before you can click the URL to take you to the download site. How do I pause it from occuring until they click the link?

    Also, how do I create check boxes in PHP?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You have to realize that PHP runs on the server and has no clue whatsover the user does on his client side (usually the browser). In other words, the script runs from the top to the bottom and each line is processed as written, and then the output is sent to the browser.
    So if you use this system() function directly after you created the zipfile, you delete it. The output is a broken link.

    Solution:
    You don't need to "pause" PHP. You simply serve a link to a separate file that fetches the zip and serves it with the appropriate headers to the client and then deletes it.

    I don't quite get your question about checkboxes. Do you mean how to print them out? That's usually done like

    PHP Code:
    echo '<input type="checkbox" name="myCheckBox" value="myValue">'


  •  

    Posting Permissions

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