Code in uploadpic.php print "
"; print ""; print ""; print "
File Upload:
"; print""; print"
Image Title
"; print""; print"
Image Description
"; Code in dopic.php $fname=$_POST['picture']; $descrip=$_POST['descrip']; $file_dir ="gallery/"; foreach($_FILES as $file_name => $file_array) { echo "path: ".$file_array["tmp_name"]."
\n"; echo "name: ".$file_array["name"]."
\n"; echo "type: ".$file_array["type"]."
\n"; echo "size: ".$file_array["size"]."
\n"; if (is_uploaded_file($file_array["tmp_name"])) { move_uploaded_file($file_array["tmp_name"], "$file_dir/".$file_array["name"]) or die ("Couldn't copy"); echo "Done!
"; } } $image=$file_dir.$file_array["name"]; $ip = getenv("REMOTE_ADDR"); $sql = "insert into gallery (picture,files,descrip,updated)values('$fname','$image','$descrip',now());"; mysql_query($sql,$mysql); mysql_close($mysql); ------------------------------------------------------------------------------------ Proof of Concept : http://www.example.com/path_gallery/uploadpic.php Shell : http://www.example.com/path_gallery/gallery/shell.php See for the demo : http://www.example.com/demo/demo1.png http://www.example.com/demo/demo2.png http://www.example.com/demo/demo3.png