Re: help on creating a CSV file on the fly and sending it over to the customer

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: help on creating a CSV file on the fly and sending it over to the customer
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4982@lists.php.net to get a copy of this message
Carlos, I hope that I can provide some insight to you, and others on the list. In answer to your questions, I have the following advice: 1) PHP can automatically build arrays from HTML forms if you name the elements correctly. This functionality is most often used with multiple select lists, but can also be used with checkboxes. Simply name each checkbox something like "order[2354]" where 2354 is the appropriate order number. When submitted, your PHP script will have a $HTTP_*_VARS["order"] array that can be walked through using foreach, or a similar construct. 2) Downloading files automatically from a web page can be accomplished using a meta refresh tag, and a content-disposition header. The download page for WinZip is a good example of the meta refresh tag, and the HTTP spec will cover the content-disposition header. I hope that this help you, and others. Thanks. Peter On Sun, 3 Dec 2000, Nando2 wrote: > > My difficulties are : > > 1) How to submit the selected checkboxes to have their respective order > number included on the SQL statement. How would I name the checkboxes fields > so that I can referrence them later? > > 2) How to send the CSV file to the user once it is created. > > Could you help me clarify that? > > regards, > > C.F. >

« previous php.db (#4982) next »