newbie here. I got a problem regarding how to insert multiple checkbox values together with upload file inside of the Ajax. I have tried all of the solutions on this website but none of them works. I`m using PHP with Mysqli. Now, I have created a code like this:
Form.php
<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit">
<input type="text" id="project_name" placeholder="Project name . . ."/>
<input type="checkbox" id="check1" class="chk-btn" value="1"/>
<label for="check1">Number 1</label>
<input type="checkbox" id="check2" class="chk-btn" value="2"/>
<label for="check2">Number 2</label>
<input type="checkbox" id="check3" class="chk-btn" value="3"/>
<label for="check3">Number 3</label>
<input type="checkbox" id="check4" class="chk-btn" value="4"/>
<label for="check4">Number 4</label>
<input type="date" class="form-control" id="date" name="date"
<button type = "submit" id="addnew" class ="btn btn-primary">Add</button>
</form>
Please help me, i`m a newbie in jQuery.
Aucun commentaire:
Enregistrer un commentaire