0

Hi,

My problem is that I'm recovering data (which depend on what the user selected on a first page) from a SQL database for several language checked (also on that 1st page).
I would like to create files for each one of the language selected.

For now, I tried to use a while with a variable initialized at 0 and to launch the creation of the file before incrementing that variable.

$d=0;
while ($d<sizeof($id_langue))
{
RECOVERING OF DATA

		header('Content-Description: File Transfer');
		header('Content-Type: application/octet-stream');
		header('Content-Disposition: attachment; filename="'.ucfirst($id_lange[$d]).'.text";');

$output_text .= $data[$element];
}
$d++;

However, my files is incremented with every data.
I tried to refresh my page after the $d++; but the URL is depending what the user selected...
And just a header('Refresh: 5'); doesn't word.

I'm sorry if I made any language mistakes.
Regards.

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by clems31
0

I think you can not download multiple file at a once.
You can zip all files in one zip file and then download that zip file.
That is best solution.

0

That would be just fine !!
How could I do such thing?..
To zip the files, I have to create them first, don't I ?

Edited by clems31: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.