Tengo el siguiente problema que me esta matando la cabeza

Lo que necesito es pasar ese importe ($7.00) a un textbox (llamado ARANCEL) que tengo en la misma pagina o tomar ese valor para despues multiplicarlo por la cantidad de CONSULTAS.
Les dejo el codigo:
BUSCADOR.PHP
Código PHP:
<?php
require('config.php');
require('include/conexion.php');
require('include/funciones.php');
if(isset($_GET['q']) and !eregi('^ *$',$_GET['q'])){
$q = sql_quote($_GET['q']); //para ejecutar consulta
$busqueda = htmlentities($q); //para mostrar en pantalla
$sqlStr = "SELECT * FROM nomhospital where (codigo='".$q."')";
$sqlStrAux = "SELECT count(*) as total FROM nomhospital where (codigo='".$q."')";
}else{
$sqlStr = "SELECT * FROM nomhospital";
$sqlStrAux = "SELECT count(*) as total FROM nomhospital";
}
$aux = Mysql_Fetch_Assoc(mysql_query($sqlStrAux,$link));
$query = mysql_query($sqlStr.$limit, $link);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Buscador en AJAX</title>
<link rel="stylesheet" href="pagination.css" media="screen">
<link rel="stylesheet" href="style.css" media="screen">
<script src="include/buscador.js" type="text/javascript" language="javascript"></script>
</head>
<body>
<form action="index.php" onsubmit="return buscar()">
<label>Buscar</label> <input type="text" id="q" name="q" value="<?php if(isset($q)) echo $busqueda;?>" onKeyUp="return buscar()">
Arancel <span id="loading"></span>
<label for="textfield"></label>
<input type="text" name="ARANCEL" id="ARANCEL" value="<? echo($valor);?>" />
</form>
<div id="resultados">
<p><?php
if($aux['total'] and isset($busqueda)){
echo "{$aux['total']} Resultado".($aux['total']>1?'s':'')." que coinciden con tu búsqueda \"<strong>$busqueda</strong>\".";
}elseif($aux['total'] and !isset($q)){
echo "Total de registros: {$aux['total']}";
}elseif(!$aux['total'] and isset($q)){
echo"No hay registros que coincidan con tu búsqueda \"<strong>$busqueda</strong>\"";
}
?></p>
<?php
if($aux['total']>0){
echo "\t<table class=\"registros\">\n";
echo "<tr class=\"titulos\"><td>Titulo</td></tr>\n";
$r=0;
while($row = mysql_fetch_assoc($query)){
echo "\t\t<tr class=\"row$r\"><td>".htmlentities($row['descripcion'])."</a></td><td>".htmlentities($row['arancel'])."</a></td></td>\n";
$valor= $row['arancel'];
if($r%2==0)++$r;else--$r;
}
echo "\t</table>\n";
}
?>
</div>
</body>
</html>
Código PHP:
<?php
require('config.php');
require('include/conexion.php');
require('include/funciones.php');
if(isset($_GET['q']) and !eregi('^ *$',$_GET['q'])){
$q = sql_quote($_GET['q']); //para ejecutar consulta
$busqueda = htmlentities($q); //para mostrar en pantalla
$sqlStr = "SELECT * FROM nomhospital WHERE (codigo='".$q."')";
$sqlStrAux = "SELECT count(*) as total FROM nomhospital WHERE (codigo='".$q."')";
}else{
$sqlStr = "SELECT * FROM nomhospital";
$sqlStrAux = "SELECT count(*) as total FROM nomhospital";
}
$aux = Mysql_Fetch_Assoc(mysql_query($sqlStrAux,$link));
$query = mysql_query($sqlStr.$limit, $link);
?> <p><?php
if($aux['total'] and isset($busqueda)){
echo "{$aux['total']} Resultado".($aux['total']>1?'s':'')." que coinciden con tu búsqueda \"<strong>$busqueda</strong>\".";
}elseif($aux['total'] and !isset($q)){
echo "Total de registros: {$aux['total']}";
}elseif(!$aux['total'] and isset($q)){
echo"No hay registros que coincidan con tu búsqueda \"<strong>$busqueda</strong>\"";
}
?></p>
<?php
if($aux['total']>0){
echo "\t<table class=\"registros\">\n";
echo "<tr class=\"titulos\"><td>Titulo</td></tr>\n";
$r=0;
while($row = mysql_fetch_assoc($query)){
echo "\t\t<tr class=\"row$r\"><td>".htmlentities($row['descripcion'])."</a></td><td>".htmlentities($row['arancel'])."</a></td></td>\n";
$valor= $row['arancel'];
if($r%2==0)++$r;else--$r;
}
echo "\t</table>\n";
}
?>
Código PHP:
<?php
$host = "localhost";
$user = "USUARIO";
$pass = "CONTRASEÑA";
$db = "clinica";
?>
Código PHP:
<?php
function sql_quote( $value )
{
if( get_magic_quotes_gpc() )
{
$value = stripslashes( $value );
}
//check if this function exists
if( function_exists( "mysql_real_escape_string" ) )
{
$value = mysql_real_escape_string( $value );
}
//for PHP version < 4.3.0 use addslashes
else
{
$value = addslashes( $value );
}
return $value;
}
?>