I have a simple file form with a file 
   
  <form enctype="multipart/form-data" action="upload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
 Send this file: <input name="userfile" type="file" />
 <input type="submit" value="Send File" />
</form>
   
  The upload.php script which is : 
   
   
  $uploaddir = 'uploads/';  // the dir where i upload the images //
  $uploadfile = $uploaddir . $_FILES['userfile']['name'];
   
  if (isset($_POST['Submit']))
$userfile = $_POST['userfile'];
  print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
   print "File is valid, and was successfully uploaded. ";
   } else {
   print "File upload error!\n";

}

   
  is incomplete as you can see, and here are my questions:
   
  a) how to verify if the uploaded file is an image ?
  b) how to print the image?
  c) how to resize the image?
   
  Thanks.
   

                        
---------------------------------
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.

[Non-text portions of this message have been removed]



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to