Skip to content

Instantly share code, notes, and snippets.

@arrowmedia
Created December 8, 2013 21:34
Show Gist options
  • Save arrowmedia/7864127 to your computer and use it in GitHub Desktop.
Save arrowmedia/7864127 to your computer and use it in GitHub Desktop.
<?php
if( isset($_POST['submit']) ) {
 
include('SimpleImage.php');
$image = new SimpleImage();
$image->load($_FILES['uploaded_image']['tmp_name']);
$image->resizeToWidth(150);
$image->output();
} else {
 
?>
 
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="uploaded_image" />
 
<input type="submit" name="submit" value="Upload" />
 
</form>
 
<?php
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment