PDA

View Full Version : uploading


nathan123
10-19-2005, 09:25 AM
Is there a way of uploading JUST .txt file fomats and saving them to MYSQL table?? but without any other components?

Nathan

glenngv
10-19-2005, 12:13 PM
Pure ASP File Upload (http://www.asp101.com/articles/jacob/scriptupload.asp)

Morgoth
10-23-2005, 12:15 AM
Do you mean upload text files, or just text itself?

Can the user not copy the string from inside the text file and paste into, an input box, then be submited?

nathan123
10-24-2005, 01:13 PM
I meant just text files.... sorry... still stuck on it

Morgoth
10-24-2005, 01:20 PM
Uploading a txt is the same as uploading a jpg; it's what you do with it that's different. You can upload a jpg into a folder just like you can upload a txt file into a folder, there is no difference.

Glenngv gave you a link called Pure ASP File Upload:
http://www.asp101.com/articles/jacob/scriptupload.asp

This is how to upload a text file without a component. Follow the instructions given, make an upload script (separate from your website files) and if you get it working, implement it into your already written code.

If you have any troubles with the link Glenngv provided, reply in here with your questions.

nathan123
10-26-2005, 08:39 AM
this code doesnt save to the file to a DB does it? I wanted people to save a lesson plan. So it would just be txt files that would save in a field of MySQL - as i understand - this is BLOB?

Morgoth
10-26-2005, 04:19 PM
Ok, so use the code given to upload the txt file.

When that file has been uploaded you will use a script that will read the text file and input it's information into a database.

Text Stream
http://www.w3schools.com/asp/asp_ref_textstream.asp
Read a Text File
http://www.w3schools.com/asp/showasp.asp?filename=demo_readtextfile

Do you understand how to do this now?
Don't forget to either rename the text file that has been uploaded, so it doesn't get overwritten, or delete it. You might encounter problems where the file you uploaded didn't actually get uploaded, and you just copied the text out of a file that was already uploaded by someone else.

File system
http://www.w3schools.com/asp/asp_ref_filesystem.asp

Enjoy!!!

nathan123
11-02-2005, 03:29 PM
Hi, thankyou for your reply... unfort. this is way above me!
Would it be possible to create a demo for me? a template if you like! This would make it easier for me.... I hope you can.