I want to upload image and want to store that image in database as well.But when i click on image to open browse file dialogue box the form already submited.But i want to submit form after i select image.

Here is my code
<form>
<input type="file" id="my_file" style="display:none;" />
<input type="image" src="albert-einstein-bike.jpg" width="90px" height="200" />
</form>
<script>
$("input[type='image']").click(function() {
$("input[id='my_file']").click();
});
</script>