Skip to main content
Known Participant
March 2, 2007
Question

Problems getting a file back from MySQL database

  • March 2, 2007
  • 1 reply
  • 214 views
Hi all,

I am developing a site where members can upload documents and attach them to articles which they publish.
I have been running through a tutorial about uploading files to a MySQL DB which can be seen @

http://www.php-mysql-tutorial.com/php-mysql-upload.php

I have managed to get as far as having the files upload to the database and i can see that they are there using the MySQL client, but my problem is trying to get the files back from the DB. I have tried implementing the code given in the tutorial, but it doesn't seem to be working
Here's the code i am using to get the file - i have passed the id of the record using the URL, but when i run it through, the page just refreshes...

This topic has been closed for replies.

1 reply

Inspiring
March 2, 2007
I really don't like storing files in the database. Much easier and more
efficient to store the files as files on the server, and store the path to
the file in the database. From an administration point of view, its much
better.

--
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.