drranch Posted September 2, 2006 Share Posted September 2, 2006 ???Hello all!I'm not sure I understand this image upload process for PHP/MYSQL....I undestand that you can upload an image to a folder, but how do you tie the item in the MYSQL database to it's specific image? ??? Link to comment https://forums.phpfreaks.com/topic/19426-i-have-image-upload-questions/ Share on other sites More sharing options...
bob_the _builder Posted September 2, 2006 Share Posted September 2, 2006 Hi,Store the filename.extension in your databse .. then you use that to match the image name to the image[code=php:0]<img src="'.$images_dir.'/'.$row['photo_filename'].'">';[/code]hth Link to comment https://forums.phpfreaks.com/topic/19426-i-have-image-upload-questions/#findComment-84364 Share on other sites More sharing options...
drranch Posted September 2, 2006 Author Share Posted September 2, 2006 The "$images_dir.." would that be where my host provider set up the temp directory for?Host php.ini configuration...upload_tmp_dir C:\WINDOWS\Temp Link to comment https://forums.phpfreaks.com/topic/19426-i-have-image-upload-questions/#findComment-84367 Share on other sites More sharing options...
bob_the _builder Posted September 2, 2006 Share Posted September 2, 2006 Nope that will be the path to where you shifted the image upon upload:$images_dir = 'images/gallery';hth Link to comment https://forums.phpfreaks.com/topic/19426-i-have-image-upload-questions/#findComment-84370 Share on other sites More sharing options...
drranch Posted September 2, 2006 Author Share Posted September 2, 2006 I think I found a pretty good tut on this...after reading the first two pages your advise is more clear in my head!http://codewalkers.com/tutorials/35/1.htmlThank you for your knowledge and time! Link to comment https://forums.phpfreaks.com/topic/19426-i-have-image-upload-questions/#findComment-84376 Share on other sites More sharing options...
bob_the _builder Posted September 2, 2006 Share Posted September 2, 2006 Hi,Looks like that tut shows how to store the images within the database .. Im sure the best option is to store the name+extension in the database and the photo/file in a folder on the server.Post what code you have if you get stuck. Link to comment https://forums.phpfreaks.com/topic/19426-i-have-image-upload-questions/#findComment-84820 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.