PHP updating field value through AJAX
===

I have a table of items, and when the user selects an item i want to set that id to a php variable so when it hits the button "Ok" i associate that item with the user. He can only choose one item at a time. I have tried some php / ajax tutorials and it didn't seem to work.

Here are the codes:

    <table id="tableItens" style="border:1px solid #000000;" cellpadding="0" cellspacing="0">
	<tbody>
		<?php foreach($produtoList as $produto) {
			if ($columnCounter == 0) { ?>
				<tr style="background-color:#FFFFFF;">
			<?php	 
			} 
		?>				
				<td id="<?php echo $produto['id'] ?>" width=160px; height="110" onclick="<?php echo 'selectRow(' . $produto['id'] . ');' ?>" style="text-align: center; border:1px solid #000000;border-bottom:0;"><?php echo'<img align="center" width="150" height="100" src="/resources/images/' . $produto['nome_imagem'] . '"></img>' ?></td>
				<?php $columnCounter++; ?>					
			<?php if ($columnCounter == 3) { 
				$columnCounter = 0; ?>
				</tr>
			<?php } ?>		
		<?php } ?>
	</tbody>
</table>

    <script type="text/javascript">
    function selectRow(id) {
      var table = document.getElementById("tableItens");
      document.getElementById(id).style.backgroundColor = 'red';

	  $.ajax
      ({
          type: "POST",
          url: "vote.php",
          data: id,
          cache: false,
          success: function(data)
          {

          	alert("ok");
          }
     });	
    }
    </script>


Do i have to include a ajax file or something? Maybe a jquery reference?

I'm using a var_dump($_POST) at the beginning of the page and doesn't show anything. I'm sending the value to the same page im in.