cannot upload images

images php coding issues or problems here.

Moderators: macek, egami, gesf

jeffsss
New php-forum User
New php-forum User
Posts: 3
Joined: Thu Mar 01, 2012 4:48 pm

cannot upload images

Postby jeffsss » Mon Mar 12, 2012 3:49 pm

hi i have problem upload image to server.

my form code as below:
<form enctype="multipart/form-data" action="upload_image.php" method="POST">
<label for="file[]">Image 1: </label><input type="file" name="file[]" id="file[]" />
<br / >
<label for="file[]">Image 2: </label><input type="file" name="file[]" id="file[]" />
<br / >
<input type="submit" value="Upload" />
</form>

then my upload_image.php coding as below:
<?php
move_uploaded_file( $_FILES["file"]["name"][0], "upload/" . $_FILES["file"]["name"][0]);
move_uploaded_file( $_FILES["file"]["name"][1], "upload/" . $_FILES["file"]["name"][1]);
?>

But when i trying to upload images, nothing happen and no image being uploaded to server. Please help to find where went wrong on my scripts.

Thanks a lot.

Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 0 guests