Hi
I’m redoing arts of an existing code, and in that code theres the option to upload 10 images, like this:
[code]
this calls for ‘addoffer.php’ where the images are handled as:
[php]
<?php if(isset($_POST[s1])) { if(!empty($_FILES[images][name][0])) { while(list($key,$value) = each($_FILES[images][name])) { if(!empty($value)) { $NewImageName = $t."_offer_".$value; copy($_FILES[images][tmp_name][$key], "re_images/".$NewImageName); $MyImages[] = $NewImageName; } } if(!empty($MyImages)) { $ImageStr = implode("|", $MyImages); } } ?>[/php]What it does now is copy the files to ‘re_images’ and add a string to the DB where ‘|’ is the seperator (like image01|image02etc).
The problem is that it’ll store the images as supplied by the user (so there are 1.5MB files stored that will be used 150pixels wide)… and there is the problem popping up. I’ve tried to add all sorts of codes I found, at least 10 of them’ but I’m doing something terribly wrong as nothing seems to work.
Can anyone show me how it’s done PLEASE?
thanks in advance!
JP
**MOD EDIT - Added PHP Tags to for readablity! Please refer to http://phphelp.com/guidelines.php for posting guidelines