Hello World
upload
if (isset($submit)) { echo "Got here!"; // If the Submitbutton was pressed do: // if ($_FILES['imagefile']['type'] == "image/gif") { if (1) { // copy ($_FILES['imagefile']['tmp_name'], "files/".$_FILES['imagefile']['name']) // or die ("Could not copy"); echo "\n
Copy completed:"; echo "\n
Name: $imagefile_name"; echo "\n
Name: ".$HTTP_POST_FILES['imagefile']['tmp_name'].""; echo "\n
Size: $imagefile_size"; echo "\n
Type: $imagefile_type"; copy ($HTTP_POST_FILES['imagefile']['tmp_name'], "/tmp/poo.gif") or die ("Could not copy"); // echo "Name: ".$_FILES['imagefile']['tmp_name'].""; // echo "Name: ".$_FILES['imagefile']['name'].""; // echo "Size: ".$_FILES['imagefile']['size'].""; // echo "Type: ".$_FILES['imagefile']['type'].""; } else { echo ""; echo "\nCould Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")"; } } ?>
More info ...
PHP and MySQL