Images and files can be uploaded/submitted to server by setting enctype attribute of form tag to multipart/form-data.
enctype specifies how form data would be encoded while submitting to the server.
Example
<form method="post" enctype="multipart/form-data" action="upload.php">
<input type="file" name="pic" />
<input type="submit" value="Upload" />
</form>