Page 1 of 1

Creating a form which can submit a Word document via email

Posted: Fri May 28, 2010 8:18 pm
by p_s_92
The purpose of the form is that different people can go to its address like http://www.testmysitename.com , enter their information like First Name, Last Name, phone number, email address and attach a MS-Word document which has 2-3 pages description about them, their main aspects of biography.

In a nutshell, it would have five fields like Fname, LName, phone, email and the fifth would be a field with browse button. After the form is submitted, the Word document contents should be stored in a table in MySQL and the Word document would be emailed to a person.

I am completely new to PHP. But, I have head that building such a form with PHP and using MySQL as the backend should be possible.

1. Did I hear correctly that building such a form using PHP as front end and MySQL as back end can be done? Or, are there other tools/environments I should be looking to like Flex/Coldfusion?

2. How long would it take to create such a form approximately for a newbie like me? My programming background is more in C,C++, some HTML, Javascript.
I don't want to use tools like PHPMaker, Scripani and sites like http://www.formmail-maker.com/generator.php or tools like PHP Generator for MySQL since I am new to PHP, I guess building this will help me learn a new language.

3. Would I need Apache or IIS can be configured with PHP as IIS is already running on my machine(Windows XP). I don't know if Comcast would provide hosting of PHP pages on the webspace they provide(if they provide any hosting). If not, how difficult it is set up Apache on a XP machine.

4. When the Word document will be emailed is there a way that functionality can be tested if I don't have a mail server running? Or, if it is running on the webspace provided by Comcast, something can be worked out to test the functionality?


Any advice would be welcome.

Re: Creating a form which can submit a Word document via ema

Posted: Sat May 29, 2010 3:32 am
by internet-solution
1. Yes it can be done. If you are on windows, you can also use MS SQL server instead of MySQL. PHP supports both (+ other database servers)
2. To generate such form from scratch it should not take more than 4/5 hours + similar time for researching (Google, asking forums etc.) if you are new. This will also include setting up the database.

3. There is a PHP5 module in IIS. I believe it comes with Microsoft web development tool box. On the other hand setting up APCHE / PHP /MySQL on a windows box is not difficult.

4. On windows machine without e-mail server, you can use fsockopen to use your SMTP servers (you can find a code example here) or Gmail to send out e-mail messages. Then when you move to your webserver, you will be able to continue using these functions.

Re: Creating a form which can submit a Word document via ema

Posted: Sat May 29, 2010 3:44 pm
by p_s_92
Thanks for the reply and advice.

Will try it out and post here if have more questions. BTW, which books would you recommend for a person like me? I know a bit of Perl too along with C,C++,HTML, Javascript, Flex, Coldfusion

Re: Creating a form which can submit a Word document via ema

Posted: Sat May 29, 2010 7:20 pm
by internet-solution
I have never depended on programming books. There are plenty Guestbook / file upload /email examples/tutorials around. Google them. I would also suggest using php.net as reference.