The problem:
when the input type on my submit button is changed to 'button' it does NOT save info to mysql but validation works. If i change it to input type on submit button to 'submit' it saves info to mysql but the validation does not work. Is there a resolution to this?
jquery validation - function on click:
$("input:button").click(function(){
var retVal = false;
$.each([1, 2], function(i, val){
retVal = (validate(val) || retVal);
});
return retVal;
On my form the submit button code is:
<input type="submit" value="Submit" />
The form action is:
<form name="list1"; action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" >