<?
require 'mysqlconnect.inc.php';
$product = "";
if(IsSet($_GET['param'])) $name = $_GET['param']; 
$table = $GLOBALS['machinetable'];
$query = "select * from $table where iplocation = '$name'";
$result = mysql_query($query);
$row = mysql_fetch_object($result);
$count = mysql_num_rows($result);

if ($count > 0) {
  $id = ($row->id);
  $mname = ($row->machinename);
  $mip = ($row->iplocation);
  $msoft = ($row->availsoft);
  $mbusy = ($row->busy);
  $mtimes = ($row->timesnapshot);
  $state = ($row->state);
}

 $retval =  $id.":";
 $retval .= $mname.":";
 $retval .= $mip.":";
 $retval .= $msoft.":";
 $retval .= $mbusy.":";
 $retval .= $mtimes.":";
 $retval .= $state.":";

echo $retval;  //This will become the response value for the XMLHttpRequest object
?> 
