$(document).ready(function(){
$("#submit").click(function(){
var money = $("#money").val();
var time = $("#time").val();
var operation = $("#operation").val();
var count = $("#count").val();
var id = $("#id").val();
var accid = $("#accid").val();
// Returns successful data submission message when the entered information is stored in database.
var dataString = 'money1='+ money + '&time1='+ time + '&operation1='+ operation + '&count1='+ count +'&idd='+ id + '&accidd=' + accid;
if(money===''||time===''||operation===''||count===''||id===''||accid==='')
{
alert("Please Fill All Fields");
}
else
{
// AJAX Code To Submit Form.
$.ajax({
type: "POST",
url: "ajaxsubmit.php",
data: dataString,
cache: false,
success: function(result){
alert(result);
}
});
}
return false;
});
});