Passing values from jQuery to PHP
<p>Here's the situation:  </p>

<p>I'm using jquery.validate.js to validate my forms, but I need to add a server-side validation layer.  jQuery Validate uses class names within form-elements to determine what it should do -- I want to fetch those class names into PHP so that I can perform the same validations on the server-side.</p>

<p>I'm hoping to do something like this:</p>

<pre><code>foreach($_POST as $key=&gt;$value) {
     $class=array(...// get this #key element class name list with jQuery
     $error=...// based on the class names, perform specific PHP validations
     if($error=="")
         return true;
     else
         return false;
}
</code></pre>

<p>Question is, can I do this?  Can I fetch element class names w/ jQuery and pass them to PHP?</p>
