<html>
<body>
<?php
include('imgtohtml.class.php');
if(
$_POST['create']) {
    
$img=imagecreatefromjpeg($_FILES['image']['tmp_name']);
    
$convert=new imgtohtml($img);
    echo 
$convert->tohtml();
} else {
?>
<form method="POST" enctype="multipart/form-data">
    <input type="file" name="image">
    <input type="submit" name="create" value="CONVERT!">
</form>
<?php
}
?>
</body>
</html>