This is a discussion on "[SOLVED] Image Upload with PHP/MySQL" within the PHP Forum section. This forum, and the thread "[SOLVED] Image Upload with PHP/MySQL are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Image Upload with PHP/MySQL
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] Image Upload with PHP/MySQL
I've read through other forums on this topic, and I'm having so much trouble I could kick a cat.
Can anyone recommend a good tutorial or walk-through to upload image info to a database and the image itself into a folder on the server, and also be able to display the images to the web browser. All the tutorials I've found are outdated, or aren't working. Any help would be greatly appreciated. Thanks! |
|
|
|
#2
|
|||
|
|||
|
Re: Image Upload with PHP/MySQL
You can go through with all the great PHP tutorial from W3Schools.
I might think that this will help you! [PHP File Upload]
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
#3
|
|||
|
|||
|
Re: Image Upload with PHP/MySQL
I don't know where I had obtained this code from www.tizag.com:
HTML form for user:
And yes, this is a very simple and vulnerable script. You will have to secure it. I don't use this script on my website. It for my hobby use on localhost machine.
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
|
|
#4
|
||||
|
||||
|
Re: Image Upload with PHP/MySQL
I use one similar to Rohan. But mine first checks to see if the user is logged in, therefore making it more secure.
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
|
#5
|
|||
|
|||
|
Re: Image Upload with PHP/MySQL
Thanks for the replies everybody!
I actually found one that works (it's very similar to yours rohan, just the basics), except it loads the image info into a database, so I can call it with php). It is very insecure though. I actually found it on about.com of all places. I'm sick today, but I'll post it when I return to work on tuesday. I'll probably use the w3c schools tutorial to add a few restrictions (thanks monie). I'm surprised that I couldn't find a tutorial that clearly combined the upload ability with the mysql info storage, security and file restrictions, but with your suggestions I think I'll be able to piece it all together. jackfranklin, could you let me know about your security measures? Thanks again, everyone! |
|
#6
|
|||
|
|||
|
Re: [SOLVED] Image Upload with PHP/MySQL
Here's the code I used for my image upload. I hope it helps someone else.
I'm only using one table in my database. And you must create the images folder on your server before you can use this, or else you will get errors. Good luck! I'm running into a different problem now though... I've got another post up in this forum called "Image UPLOAD problem". Any help will be greatly appreciated!
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Image Upload Problem | kidreapertronV | PHP Forum | 1 | Jan 31st, 2008 18:38 |
| [SOLVED] Php/Mysql Image Problem | longstand | PHP Forum | 6 | Oct 17th, 2007 17:27 |
| Upload image file to MySQL as BLOB | csun | PHP Forum | 4 | Aug 22nd, 2007 13:14 |
| asp file upload script having problems with MYSQL | paulmcn | Classic ASP | 2 | Oct 5th, 2005 18:45 |
| file upload asp-mysql database | fluff | Classic ASP | 7 | Aug 19th, 2004 10:45 |