When I use enctype=“multipart/form-data” for upload and input many data get null, if delete enctype=“multipart/form-data” it can get data but upload null. My code html
<form action="createvendor" method="post" enctype="multipart/form-data">
<div>
<label> <input placeholder="Username:" type="text"
name="username" tabindex="1" >
</label>
</div>
<div>
<label> <input placeholder="Password" type="password"
name="password" tabindex="2" >
</label>
</div>
<div>
<label> <input placeholder="Firstname:" type="text"
name="firstname" tabindex="3" >
</label>
</div>
<div>
<label> <input placeholder="Lastname:" type="text"
name="lastname" tabindex="4" >
</label>
</div>
<div>
<label> <input placeholder="ID card:" type="text"
name="personalID" tabindex="5" maxlength="13"
onKeyUp="if(isNaN(this.value)){ alert('กรุณากรอกตัวเลข 13 หลักเท่านั้น'); this.value='';}"
>
</label>
</div>
<div class="registration_form">
<div style="position: relative;">
<a class='btn btn-primary'> Choose your ID card picture <input
required class="form-control" type="file"
style='position: absolute; z-index: 2; top: 0; left: 0; filter: alpha(opacity = 0); -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; opacity: 0; background-color: transparent; color: transparent;'
name="picturePersonalID"
onchange='$("#upload-file-info").html($(this).val());'>
</a> <span class='label label-info' id="upload-file-info"></span>
</div>
</div>
</form>
I want to upload and input many data and send data to servlet.