Form Php


 
 A File Upload Script
 
 
 

  if ( isset( $_FILES['fupload'] ) ) {
     print "name: ".     $_FILES['fupload']['name']       ."";
     print "size: ".     $_FILES['fupload']['size'] ." bytes";
     print "temp name: ".$_FILES['fupload']['tmp_name']   ."";
     print "type: ".     $_FILES['fupload']['type']       ."";
     print "error: ".    $_FILES['fupload']['error']      ."";
     if ( $_FILES['fupload']['type'] == "image/gif" ) {
         $source = $_FILES['fupload']['tmp_name'];
         $target = "upload/".$_FILES['fupload']['name'];
         move_uploaded_file( $source, $target );// or die ("Couldn't copy");
         $size = getImageSize( $target );
         $imgstr = "

         $imgstr .= "src=\"$target\" alt=\"uploaded image\" />

";
         print $imgstr;
     }
 }
 ?>
 

      action="" method="post">