Reply to Re: Mail Fields To Database. Exportable...any ideas?

Your name:

Reply:


Posted by Carl on 05/22/07 18:46

Truck Estevez <oohtruck@gmail.com> writes:

> Hey, intermediate php/mysql user here. I have a mailing list form on
> my website, what i'd ultimately like to happen is when the user
> submits their information that all goes into the database. The tricky
> part is i'd like it so for my clients, they can go to an admin utility
> and press an "export" button and have it spit out the data from that
> form, into either an excel doc or a csv, whatever is easiest... any
> suggestions on how to do this?
>
> Truck

Hi Truck,

This should be quite simple if you go with csv.
Basically, you just send to content of your document
to the client just like you would a webpage, the key
is setting the correct headers so that the browser
knows what to do with it.

Take a look at the php docs for the header() function.
http://php.net/header

I think you'll want to start by setting the "content-type",
"content-length" and "content-disposition". You may also
need to set others depending on the browser.

Hope that helps,
Carl.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация