PHP Image/File Upload Code
#1
Scooby Regular
Thread Starter
iTrader: (3)
Join Date: Oct 2002
Location: Aberdeenshire
Posts: 2,787
Likes: 0
Received 0 Likes
on
0 Posts
![Question](https://www.scoobynet.com/images/icons/icon5.gif)
Looking for a little help here from anyone who is handy with PHP code?
Basically i have a form which inserts a record into a MySQL database based on the text fields completed in the form.
What i want to do is to add a file-input text field to the form so an image can be selected from the users HDD. The name of this image (i.e. image1.jpg) would then be stored in the appropriate recordset in the database and the file physically uploaded to a predetermined folder within the site. It'd also be handy if the image dimensions could automatically be obtained and stored in the DB.
I hope i've explained that clearly and correctly. It's very basic i'm sure but no amount of chopping and splicing code from image uploaders and the like into my page has proved fruitfull.![Frown](https://www.scoobynet.com/images/smilies/frown.gif)
I hope someone can help? It has been the bain of my website dabbling for some time now...
Basically i have a form which inserts a record into a MySQL database based on the text fields completed in the form.
What i want to do is to add a file-input text field to the form so an image can be selected from the users HDD. The name of this image (i.e. image1.jpg) would then be stored in the appropriate recordset in the database and the file physically uploaded to a predetermined folder within the site. It'd also be handy if the image dimensions could automatically be obtained and stored in the DB.
I hope i've explained that clearly and correctly. It's very basic i'm sure but no amount of chopping and splicing code from image uploaders and the like into my page has proved fruitfull.
![Frown](https://www.scoobynet.com/images/smilies/frown.gif)
I hope someone can help? It has been the bain of my website dabbling for some time now...
![Embarrassment](https://www.scoobynet.com/images/smilies/redface.gif)
#2
![Thumbs up](https://www.scoobynet.com/images/icons/icon14.gif)
I had to do this for a demo project some time back, I got the code from here http://www.phpfreaks.com/
#3
Scooby Regular
Thread Starter
iTrader: (3)
Join Date: Oct 2002
Location: Aberdeenshire
Posts: 2,787
Likes: 0
Received 0 Likes
on
0 Posts
![Default](https://www.scoobynet.com/images/icons/icon1.gif)
Bruce, i have just spent the last few hours on PHP Freaks and am still stuck against this brick wall. I must be really stoopid lol... ![Frown](https://www.scoobynet.com/images/smilies/frown.gif)
I really need it in laymens terms with the various code snippets and theory explained i think.
![Frown](https://www.scoobynet.com/images/smilies/frown.gif)
I really need it in laymens terms with the various code snippets and theory explained i think.
![Embarrassment](https://www.scoobynet.com/images/smilies/redface.gif)
Thread
Thread Starter
Forum
Replies
Last Post
Sam Witwicky
Engine Management and ECU Remapping
17
13 November 2015 10:49 AM
Pro-Line Motorsport
Car Parts For Sale
2
29 September 2015 07:36 PM
shorty87
Wheels And Tyres For Sale
0
29 September 2015 02:18 PM