amg182 Posted July 3, 2011 Share Posted July 3, 2011 Hi Guys. Quick question. I have a form that writes to mysql table including image upload. The image isnt actually uploaded as a blob, it only stores the image name (i.e. 123.jpg) as text, - however does store the actual image in a seperate folder. I am calling these image from my php script and unless I provide the folder directory the image obivously cant be found so is it possible to have the folder name prior to the file name( i.e /Images/123.jpg). Ideally would be nice to have a default value in the image field and the form to place the file name after this. Sorry if this is vauge. Thanks in anticipation. Quote Link to comment https://forums.phpfreaks.com/topic/241005-image-upload-to-mysql-table/ Share on other sites More sharing options...
QuickOldCar Posted July 3, 2011 Share Posted July 3, 2011 Is very possible, show your current code. You can just merge them something like this. $location = "Images/"; $image_name = "123.jpg"; $final_location = "$location$image_name"; Quote Link to comment https://forums.phpfreaks.com/topic/241005-image-upload-to-mysql-table/#findComment-1237940 Share on other sites More sharing options...
amg182 Posted July 3, 2011 Author Share Posted July 3, 2011 Worked a treat, Once again Quickoldcar you have got me out of a hole! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/241005-image-upload-to-mysql-table/#findComment-1237987 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.