title: Getting table elements in same row with jquery
body: <p>I am really confused about how I can do this. I need to get the value of two <code>&lt;td&gt;</code> when one is selected. For example, below let's say I select the td with id=monthly of $550 dollars. I need to get the age and excess that corresponds with that price. I hope this makes sense. SO in the example of selecting $550 I need jQuery to get the values age(18-24) and excess($1000). I then will take these two values and insert into mysql as noted below. Is there anyway I can do this with either jQuery or PHP? I am open to ideas. </p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
      &lt;td width="67"&gt;&lt;/td&gt;
      &lt;td width="102" id="excess"&gt;$1000&lt;/td&gt;
      &lt;td width="102" id="excess"&gt;$2000&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td width="67" id="age"&gt;18-24&lt;/td&gt;
      &lt;td width="102" id="monthly"&gt;$550&lt;/td&gt;
      &lt;td width="102" id="monthly"&gt;$650&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td width="67" id="age"&gt;25-29&lt;/td&gt;
      &lt;td width="102" id="monthly"&gt;$750&lt;/td&gt;
      &lt;td width="102" id="monthly"&gt;$850&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>MYSQL(using the example above):</p>
  
  <pre><code>$query = mysql_query("UPDATE table SET Monthly = '$550' WHERE Age = '18-24' AND Excess = '$1000'")or die(mysql_error());
  </code></pre>