I have a HTML form
<html>
<head></head>
<form>
<input type="text" name="question[]" />
<input type="text" name="question[]" />
<input type="file" name="image" />
<input type="submit" name="save" />
</form>
</html>
Now to submit form with ajax I have ajax code but its not working. It's get only one value.
$("#submit").click(function() {
var que_id = $("input[type='text'][name='question[]']").val();
$.ajax({
type: "POST",
url: "action.php",
data: {"que_id": que_id},
success: function(result) {
$("#question_wrap").html(result);
}
});
});
How do I do it?