Results 1 to 3 of 3

Thread: need some help

  1. #1
    Junior Registered
    Join Date
    Oct 2004
    Posts
    2

    need some help

    Hi,
    I’m new in here so please be nice with me
    Ok here is my problem:
    I need create a action where my clients type order number, than they click "Get file Now" and if order number is correct download of file starts automatically .
    here is example:
    http://www.xewex.com/test.html

    can someone help me please
    thanks

  2. #2
    Gimme Fries with that!
    Join Date
    Aug 2004
    Posts
    1,469
    i would do an sql database, and have two fields

    - order number
    - file

    In the order number would be your order number, in the file would be the FILE. If the order number is valid, it downloads the file, if not it gives you a message. VERY easy to program in php.

  3. #3
    Registered number7's Avatar
    Join Date
    Dec 2004
    Location
    Virtual City, Neural Networks str. 7
    Posts
    37
    while having MySQL fields:

    order_number
    file_name

    1. Step - Check for order_number validity. For security reasons if your order_number contains digits only check if it has not alphanoumeric and other characters.
    2. Step - Check if order_number is in your database.
    3. Step - Use PHP header file to send file for the user:

    PHP Code:
    if ($bIS_ORDER_OK) {
    //ZIP file
    header("Content-type: application/zip"); 
    header("Content-Length: ".filesize('file_name.zip')); // Send file size to the client. Some clients may don't work correctly when they don't know file size.
    header("Content-Disposition: attachment; filename=file_name_visible for user.zip"); 

    // load ZIP source from server
    readfile('file_name.zip'); 


Bookmarks

Posting Permissions

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