View Full Version : need some help

10-12-2004, 07:19 AM
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:

can someone help me please

10-12-2004, 07:48 AM
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.

12-22-2004, 03:16 PM
while having MySQL fields:


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:

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