DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Need file upload code for word Doc (http://www.daniweb.com/forums/thread41637.html)

kgonsalv Mar 22nd, 2006 4:04 pm
Need file upload code for word Doc
 
Im looking for a simple code for users on my webpage to upload a .doc or .txt file to my email address. I've only found ones in CGI which i can't use and the one i tried only send it in binary code and not the actual word doc. Does anyone have a simple code that I can use?

tgreer Mar 22nd, 2006 6:28 pm
Re: Need file upload code for word Doc
 
Upload to your email address? Hmmm.

You can have the user upload any file at all, by placing a file upload element on your page.

<input type="file">

There are some optional attributes, such as ID or NAME, and SIZE (referring to the size of the textbox, not the size of the file.

The form must be properly encoded to allow files to be posted, add the enctype="multipart/form-data" key-value pair to your FORM element.

Once it's on the server, you'd use whatever server-side language you use to process the file, which could include emailing it somewhere.


All times are GMT -4. The time now is 5:29 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC