| |||||||||||
| |||||||||||
Uploading images/other binaries to MySQL via PHP Posted by admin (Graham Ellis), 10 September 2007 An excellent question here (via email) from a correspondent who needs to upload pictures for his shop site and found my example on our web siteQuote:
The question is not a new one ... so I thought it worthwhile pulling all my resources into one place and answering fully ... The script you have found puts together many different aspects of http, PHP and MySQL - although it is short, it is not simple and it is not intended as a script for newcomers. You'll see a lot of comments submitted by people saying how great it is, but a few saying that they cannot get it to work and that's because there are server settings to make, such as directories, passwords, etc - and probably URLs to change too. I won't know exactly which page you found, but the complete example comprises the following pages Article on subject Running example Looking at uploaded images Sourec code - viewing source code - upload Have a look through all of these pages - the first link especially which has tips and instructions at the bottom of it and which answer most of the common questions. Take it step bt step - see if you can get the form up with the same tags in the HTML as mine, then if you can get the temporary file onto the server, then into the database. Finally test if you can get it back. Splitting your problem down will help you find where it is. If the description above leaves you asking "how do I do THAT?" then you're probably not yet at the stage to be comfortably working with the script and should learn some more basic stuff. I would normally recommend our course (running next week!) at http://www.wellho.net/course/phfull.html or thath you drop by one evening, but I suspect that you're not from the same part of the world that we're in; you should, then, be able to find someting along the same lines in your area. I'll finish we another, simpler, example that uploads .pdf files ... you may get some additional clues from these pages: Commentary Upload form - source Store script - source View script - source Graham This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
| |||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||