my friends i have ajax proplem the code not working
how can i get id from part_a_new.php

database

bring data from substation table
id , station, make , last

to put troubleshoot table

id , refno , station , make , last , engname , username

i need when select station from form automaticly make and last show from substation table

the code

HTML Code:
 mysql_select_db($database_trsh, $trsh);
$query_substation = "SELECT * FROM substations";
$substation = mysql_query($query_substation, $trsh) or die(mysql_error());
$row_substation = mysql_fetch_assoc($substation);
$totalRows_substation = mysql_num_rows($substation);

<head>
<script type="text/javascript" language="javascript" src="css/jquery2.js"></script>
<script language="javascript" type="text/javascript">

function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
    }
	
	function getMake(id) {		
		
		var strURL="part_a_new.php?id="+id;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadymakechange = function() {
				if (req.readyMake == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('makediv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("POST", strURL, true);
			req.send(null);
		}		
	}
	function getMake(id) {		
		var strURL="part_a_new.php?id="+id;
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadymakechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('lastdiv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("POST", strURL, true);
			req.send(null);
		}
				
	}
</script>
</head>

<body>
<?php
//this code from findmake.php
?>


<?php $make=intval($_POST['id']);
$link = mysql_connect('localhost', 'root', ''); //changet the configuration in required
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db('trsh');
$query="SELECT id,make FROM substations WHERE id ='$make'";
$result=mysql_query($query);

?>


<?php 
//end of findmake.php
?>

<?php 
//this code from findlast.php
?>
<?php $last=intval($_POST['id']);
$link = mysql_connect('localhost', 'root', ''); //changet the configuration in required
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db('trsh');
$query="SELECT id,last FROM substations WHERE id ='$last'";
$result=mysql_query($query);

?>

<?php
//end of findlast.php
?>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
  <table align="center">
 <tr valign="baseline">
      <td nowrap="nowrap" align="right">Ref_no:</td>
      <td><input type="text" name="ref_no" value="" size="32" /></td>
    </tr>

<tr valign="baseline">
      <td nowrap="nowrap" align="right">Station:</td>
      <td><select name="substation_name" onChange="getmake(this.value)">
        <?php
do {  
?>
        <option value="<?php echo $row_substation['id']?>"><?php echo $row_substation['station']?></option>
        <?php
} while ($row_substation = mysql_fetch_assoc($substation));
  $rows = mysql_num_rows($substation);
  if($rows > 0) {
      mysql_data_seek($substation, 0);
	  $row_substation = mysql_fetch_assoc($substation);
  }
?>
      </select></td>
    </tr>
    <tr> </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Make:</td>
      <td><div id="makediv">
      <select name="make" onchange="getMake(<?php echo $make ?>,this.value)">
  <option></option>
  <?php while($row=mysql_fetch_array($result)) { ?>
  <option value><?php echo $row['make']?></option>
  <?php } ?>
</select>
      </div></td>
    </tr>
    <tr> </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Last:</td>
  <td><div id="lastdiv">
  
  <select name="last" onchange="getMake(<?php echo $last ?>,this.value)">
  <option></option>
  <?php while($row=mysql_fetch_array($result)) { ?>
  <option value><?php echo $row['last']?></option>
  <?php } ?>
</select>
      
      </div></td>
    </tr>
  </table>
</body>
</html>
<?php
mysql_free_result($substation);
?>
can any body tell me where is my mistake??