Hi everyone I have a problem when I submit a form the other variables are submitted and inserted to the database but the image are not..
THIS IS MY CODES..
I want to submit my form with validation and also submit image but not working..
<script type="text/javascript">
$(document).ready(function(){
$("#form2").validate({
debug: false,
rules:{
icode: {
required: true,
maxlength: 30,
},
iname: {
required: true,
minlength: 5,
},
brandname: {
required: true,
minlength: 5,
},
bb: {
required: true,
},
},
messages: {
icode: {
required: "Please Enter Your Location Code",
maxlength: "Item Code not greater than 30",
},
iname: {
required: "Please Enter Item name",
minlength: "Item Name Must at least 5 character",
},
brandname: {
required: "Please Enter brand name",
minlength: "Brandname Must At least 5 character",
},
bb: {
required: "Please upload Image",
},
},
submitHandler: function(form) {
$.post('item-exec.php', $("#form2").serialize(), function(data) {
$('#result').html(alert('Station Information Added'))
$('#result').html(window.open('item.php', '_self'))
});
}
});
});
</script>