Rosen,
Depends on where you want to save the file.
To get the manual http://www.php.net/docs.php.
To Save to a file on the machine running the browser;
make a form that outputs absolutely nothing except;
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=filename.txt");
while(list($key,$val) = each($prod)) { // the echo below sends the file
contents
$id = $val[0]; // data was loaded to array $prod as follows;
$nm = $val[1]; // $prod[] = array($productNo, $productDescr);
echo("$id,$nm\r\n"); // use \r\n if going to windows browser \n if going to
unix
}
To Save a file to the server machine hosting your website;
use normal fopen, fputs, etc (see the manual)
good luck,
Warren Vail
-----Original Message-----
From: Rosen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 1:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Saving to a file
Hi,
Sorry for the stupid question, but i don't have at me a PHP manual
and I want to save some string to file from PHP.
Can someone tell me how ( with what function to do this ) ?
Thanks
Rosen