I have a code that simply uploads an image to a certain file. Easy said easy done. My question is this 1 is it possible to upload multiple images for one product. 2 can I make PHP take a photo and re size it to say 150x150 for small and 250x250 for large? 3 would it be better to just show those images by themselves or make them into a slide show?
I can show the code I have if that will help explain what I need.
As far as resizing images, I assume you mean creating thumbnails on upload. If so, you can also resize images with PHP, but you will need to use a special extension called GD to do it. Go to php.net and install GD if you don't already have it. Then, check out this site for resizing images. It has all of the code written for you. All you have to do is write a few lines of code to make it work: http://www.white-hat-web-design.co.u...e-resizing.php.
As far as your third question is concerned, that is more subjective. I'd have to see the site to give you my opinion.
Hello, dear i have tried for multiple upload as mention u above but only one image upload at the same time. what's the problem i could not find it.
move_uploaded_file(
$_FILES["pictures"]["tmp_name"][$key],
$_FILES["pictures"]["name"][$key]
) or die("Problems with upload");
I also meant to mention that you should ensure that you have the ability to upload files on the server you are on and that you have your php.ini file setup properly to allow uploads.
Last edited by stoneman30; 03-13-2011 at 09:32 PM.
One more thing. You may have an issue with your files being too big. Check out http://www.radinks.com/upload/config.php if you are having issues with large image file sizes. It shows you how to configure the php.ini file so that it can handle larger uploads.
Learn PHP code, HTML, CSS, Javascript, MySQL, eCommerce techniques and more with free lessons from SirTechALot.com.
Bookmarks