techiefreak05 Posted November 25, 2006 Share Posted November 25, 2006 A while back, I found an image upload form that i had no use for.. but now I'm wrapping up the building of my website and am in the proccess of finalizing the last parts, like images. but im having trouble with this code.. it doesnt give me an error, but it doesnt upload:[code]<?php//print_r($_POST);if($_POST["action"] == "Upload Image"){unset($imagename);if(!isset($_FILES) && isset($HTTP_POST_FILES))$_FILES = $HTTP_POST_FILES;if(!isset($_FILES['image_file']))$error["image_file"] = "An image was not found.";$imagename = basename($_FILES['image_file']['name']);echo $imagename;if(empty($imagename))$error["imagename"] = "The name of the image was not found.";if(empty($error)){$newimage = "files/uploads/$_SESSION[username]/images/" . $imagename;echo $newimage;$result = @move_uploaded_file($_FILES['image_file']['tmp_name'], $newimage);if(empty($result))$error["result"] = "There was an error moving the uploaded file.";}}?><div id="form"><form method="POST" enctype="multipart/form-data" name="image_upload_form" action="<?$_SERVER["PHP_SELF"];?>"><p><input type="file" name="image_file" size="20"></p><p><input type="submit" value="-Upload-" name="action"></p></form></div>[/code] Link to comment https://forums.phpfreaks.com/topic/28403-php-image-upload-form-not-working-yet-no-error-solved/ Share on other sites More sharing options...
techiefreak05 Posted November 25, 2006 Author Share Posted November 25, 2006 i figured out what it was ... i changed the value of the submit button ... lol Link to comment https://forums.phpfreaks.com/topic/28403-php-image-upload-form-not-working-yet-no-error-solved/#findComment-129948 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.