move_uploaded_file($_FILES['pic1']['tmp_name'], 'pics/picture.jpg');
Repeating this three times (with pic2, pic3, pic4) doesn't seem to work.
The reason why that didn't work is because the array ['pic1'] refers the the name of the file browse field in your html form. So what you put in 'pic1' should be the same as what you put in the type='file' field. This then brings the question of how to load the image multiple times. To solve the issue of loading the file multiple times, use the following code:
<?
$image=imagecreatefromjpeg($_FILES['uploadedfile']['name']);
?>
Then the image is stored in the variable $image where it can be used by the gd library. Note you may want to alter the imagecreatefrom*() to the appropriate supported format.
Last edited by cwarn23; Oct 13th, 2008 at 8:21 am. Reason: code tags
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
Offline 3,004 posts
since Sep 2007