Create an HTML form, for example:
<html>
<body>
<form action="next.php" method="post" enctype="multipart/form-data">
<label for="image">Image:</label>
<input type="image" name="image" id="image" /><br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
Your file "next.php" can handle an image like this:
<?php
if ($_FILES["file"]["error"] > 0)
echo "Error: " . $_FILES["image"]["error"] . "<br />";
else
{
echo "Upload: " . $_FILES["image"]["name"] . "<br />";
echo "Type: " . $_FILES["image"]["type"] . "<br />";
echo "Size: " . ($_FILES["image"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["image"]["tmp_name"];
}
, jpg, gif, png . 2 3 (, , ) . ImageMagick , filesystem .