hi all

How to store xls and xslx ,txt extension file to mysql database?

Recommended Answers

All 2 Replies

Arr - ain't code tags meant to be used for code. As for the question assuming it's not code, php has a cool function called mysql_query(). With this function it is possible to insert and retrieve data from a database and to use it as something like a xls file, you could simply display the inserted data to the browser. Then when you get the user to download that file lapresto you have a downloaded xls file.

I guess, you trying to upload the user supplied files to the server.
If am right , storing them on the server inside some folder and saving their file name & path in the database is the proper way to handle this scenario.
Storing the entire file in database table is not necessary.

Edit: And if you save them, additionally you will have the memory issues.
In strict conditions if you want to do that, use the TEXT field type

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.