submit button issue with jquery and php
<p>The problem:</p>

<p>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?</p>

<p>jquery validation - function on click:</p>

<pre><code> $("input:button").click(function(){         
               var retVal = false;
               $.each([1, 2], function(i, val){
                  retVal = (validate(val) || retVal);
               });
                return retVal;   
</code></pre>

<p>On my form the submit button code is:</p>

<pre><code>&lt;input type="submit" value="Submit" /&gt;
</code></pre>

<p>The form action is:</p>

<pre><code>   &lt;form name="list1"; action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="post" &gt;
</code></pre>
