title: Multiple submit buttons on one page but distinguishable (jquery)
body: <p>I am trying to write a code that 'stores items for later' - a button that has url of the item as hidden input, on submit it calls a php script that does the storage in a db. I am more into php, very little knowledge of anything object-oriented, but I need to use jquery to call the php script without moving over there</p>
  
  <p>The problem is how to assign the x and y variables when I have multiple forms on one page</p>
  
  <p>I was only able to write the following</p>
  
  <pre><code> $("form").bind('submit',function(e){
     e.preventDefault();
  
        var x =  $("input[type=hidden][name=hidden_url]").val();
        var y =  $("input[type=hidden][name=hidden_title]").val();
  
  
  
     $.ajax({
     url: 'save_storage.php?url='+x+'&amp;tit='+y,
     success: function() {
      alert( "Stored!");
       location.reload();
     }
  });
  </code></pre>
  
  <p>});</p>
  
  <p>It works fine if you have something like...</p>
  
  <pre><code>&lt;form method="post" action="#"&gt;
   &lt;input type="hidden" id="hidden_url"  name="hidden_url" value="&lt;?php echo $sch_link; ?&gt;"/&gt;
   &lt;input type="hidden" id="hidden_title" name="hidden_title" value="&lt;?php echo $sch_tit; ?&gt;"/&gt;
   &lt;input type="submit" id="send-btn"  class="store" value="Store" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>..once on the page, I've got about 50 of them.</p>
  
  <p>These are generated via for-loop I suppose I could use $i as an identifier then but how do I tell jquery to assign the vars only of the form/submit that was actually clicked? </p>