Yes, I'd say this is the way to go. As the customer submits the order simply write out the file as you'd like it. It doesn't take long and you have all the data in the cart (I'm not sure how you're dealing with the cart - saving it in the DB, cookies, session variables - but it doesn't really matter).
Otherwise you could save this in the DB and have a demon type thing continuously poll the DB for orders not yet sent - but that's more of a pain and more likely to break as the demon fails but customers don't notice and think their orders are being processed. Even so you'd still have to write it the same way. The export or dump features will only give you the rows of data in a tab delimited format not a formatted document as you probably want. Good Luck, Frank On 4/8/02 10:40 AM, "Rick Emery" <[EMAIL PROTECTED]> wrote: > fopen() > fwrite() > fclose() > > -----Original Message----- > From: Raymond [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 08, 2002 12:05 PM > To: Frank Flynn; [EMAIL PROTECTED] > Subject: [PHP-DB] Re: Making a txt file from db data, is it possible? > > > Hi! > > Ok, I think I maybe have to explain this a little better : ) > > I have this website that have a webshop that is driven by mysql and php. > This is working fine, but when a customer puts something into his cart and > he is sending his order, I would like to send this order by fax to the store > nearest the customer. > > And I have this faxprogram that scan a directory for files and send them as > a fax. So I was thinking .... I'm not sure if it is possible, but if it is > possible to write all products in the customers cart into a txtfile. Iwould > make to send fax, or? > > Thankfull for all advices or help : ) > > Best regards Raymond > ----- Original Message ----- > From: "Frank Flynn" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Sunday, April 07, 2002 6:02 AM > Subject: Re: Making a txt file from db data, is it possible? > > >> On 4/6/02 4:12 PM, "[EMAIL PROTECTED]" >> <[EMAIL PROTECTED]> wrote: >> >>> From: "Raymond Lilleodegard" <[EMAIL PROTECTED]> >>> Date: Sat, 6 Apr 2002 17:18:07 +0200 >>> To: [EMAIL PROTECTED] >>> Subject: Re: Making a txt file from db data, is it possible? >>> >>> May I use this dump method with a query too? Or is this only for making > a >>> hole table into a txt file? >> >> By the time I caught this thread there was no mention of the DBMS you > were >> using and they are different. Still one trick that usually works is to >> create a view with the query you want and to dump that view. >> >>> Because I'm trying to get a website into a txt file and save it into a >>> directory on the server to get a order sendt by fax. Or is this a "long > way" >>> to go? >> >> Sounds like the long way to me. But like I said I just saw this am I'm > not >> sure what you're trying to do. I'd be happy to comment further if you > like >> just send more details of what you're trying to do. >> >> Good Luck, >> Frank >> >>> Regards Raymond >>> >> >> > -- Frank Flynn Poet, Artist & Mystic -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php