Another jquery to equip function. Not Working?

Another jquery to equip function. Not Working?

So I have an inventory when when ever you hit equip or unequip it will go through the function and do so while making its way to another file managing the database with a mysql query. But it doesn't seem to be working for some reason.

Anyone know why? I read through a tutorial to get the snippits and such. but no matter how many times I read it I get no result. And for some reason my equipped and unequipped items are not showing. But I am thinking it's cause of the problem with the submit.

Any help would be amazing! This is holding me back from finishing my project.

index.php
<tr><td>
    <h3>Inventory</h3>
    <div id="inventory"></div></td><td>

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
var refreshId = setInterval(function()
{
     $('#inventory').load('inventory.php').fadeIn("slow");
}, 5000);
</script>


inventory.php
<?php
      include("../../connect.php");
if(!isset($_COOKIE['player_id']))
  die('Please login.<br><a href=../../index.php>Go back</a>.');
$Player=$_COOKIE['player_id'];
$Query="SELECT * from Users where ID='$Player'";
$Query2=mysql_query($Query) or die("Could not get user stats.");
$User=mysql_fetch_array($Query2);
if($_COOKIE['password'] !=md5($User['Password']))
  die('Your Password doesnt seem right for this account. <a href=../../index.php>go back</a>');

?>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type=text/javascript>
$(document).ready(function(){
   $("form#UNEquip").submit(function() {

   var id     = $('#id').attr('value');

      $.ajax({
         type: "POST",
         url: "unequip.php",
         data: "id="+ id,
         success: function(){
            $('div.success').fadeIn().fadeOut();
         }
      });
   return false;
   });
});

$(document).ready(function(){
   $("form#Equip").submit(function() {

   var id2     = $('#id2').attr('value');

      $.ajax({
         type: "POST",
         url: "equip.php",
         data: "id="+ id2,
         success: function(){
            $('div.success').fadeIn().fadeOut();
         }
      });
   return false;
   });
});
</script>
<table border=\"1px\">
<tr><td><b><u>Equipped</u></b></td><td><b><u>Class</u></b></td><td><b><u>Action</u></b></td></tr>
<tr>
<?php
  $start="SELECT * FROM `Inventory` WHERE Owner='$Player' AND Equipped='Yes'";
  $start2=mysql_query($start);
  print"<form id=\"UNEquip\" method=\"post\">";
  while($Equipped=mysql_fetch_array($start2)){
   $Class=mysql_fetch_array(mysql_query("SELECT Class FROM Items WHERE Name='".$Equipped['Name']."'"));
   print"<td><i><input type=\"hidden\" id=\"id\" value=\"".$Equipped['ID']."\">".$Equipped['Name']."</i></td><td><i>".$Class['Class']."</i></td><td><input type=\"submit\" value=\"Unequip\"></td>";
  }
  print"</form>";
?>
</tr>
<tr><td><b><u>Inventory</u></b></td><td><b><u>Class</u></b></td><td><b><u>Action</u></b></td></tr>
<tr>
<?php
  $starter="SELECT * FROM `Inventory` WHERE Owner='$Player' AND Equipped='No'";
  $starter2=mysql_query($starter);
  print"<form id=\"Equip\" method=\"post\">";
  while($UNEquipped=mysql_fetch_array($starter2)){
  $Class=mysql_fetch_array(mysql_query("SELECT Class FROM Items WHERE Name='".$UNEquipped['Name']."'"));
   print"<td><i><input type=\"hidden\" id=\"id2\" value=\"".$UNEquipped['ID']."\">".$UNEquipped['Name']."</i></td><td><i>".$Class['Class']."</i></td><td><input type=\"submit\" value=\"Equip\"></td>";
  }
  print"</form>";
?>
</tr>
</table>
<div class="success" style="display:none;">Item changed!</div>


equip.php
<?php
        // where is your config file stored?
   include ("../connect.php");

   // CLIENT INFORMATION
   $id        = htmlspecialchars(trim($_POST['id']));

    $addClient  = "UPDATE `Inventory` SET Equipped='Yes' WHERE ID='$id'";
    mysql_query($addClient) or die(mysql_error());

?>


unequip.php
<?php
        // where is your config file stored?
   include ("../connect.php");

   // CLIENT INFORMATION
   $id        = htmlspecialchars(trim($_POST['id']));

    $addClient  = "UPDATE `Inventory` SET Equipped='No' WHERE ID='$id'";
    mysql_query($addClient) or die(mysql_error());

?>



I really hope this is well enough said and understandable. Thanks so much for looking and I hope you can help.

Thanks,
Beffic