Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading files to an SQL Database

Status
Not open for further replies.

rob555

Programmer
Joined
Feb 12, 2004
Messages
1
Location
GB
Hi,

I am very new to PHP / SQL.

Does anyone have some code that would enable me to upload files (word docs etc) to an SQL Database using PHP.

Thanks,

R
 
Why would you want to store the documents in a database? A reference table that links the files location with a description seems to be preferable.
That way the web server handles all the header issues that will come up when you have to extract the data from a binary field and stream through PHP.
I would advise to use standard PHP uploads and reference the files in an index like table.
Start reading here:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top