Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/07/2006, 08:12
fervill
 
Fecha de Ingreso: julio-2006
Mensajes: 18
Antigüedad: 17 años, 9 meses
Puntos: 0
Listar datos de varias tablas

Este es el script que he hecho :
<html>

<head>
<title>Relación de empresas</title>
<meta http-equiv="generator" content="PHP Designer 2005" />
</head>

<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<?php include "logo.php" ;?>
<?php include "header.php"; ?>
<?php include "conecta.php"; ?>

<form action="procesar.php" method="post" name="frm_clientes">
<table width='90%' border='1' align='center'>
<?php
$query = "SELECT empresas.firstinput,cif,nombre,representante,nif,d omicilio,poblacion, provincia,cp,telefono,fax,credito,disponible,coste s.cif2,total1
FROM
empresas,costes
WHERE cif=cif2
ORDER BY cif";

$results = mysql_query($query--)or die (mysql_error());


$cursos_details =<<<EOD
while($row = mysql_fetch_array($results))
<tr>
<input name="firstinput" type="text" id="firstinput" size="40" value="<?php echo $row['firstinput']; ?>"/>
</tr>
<tr>
<input name="cif" type="text" id="cif" size="40" value="<?php echo $row['cif'];?>"/>
</tr>
<tr>
<input name="nombre" type="text" id="nombre" size="40" value="<?php echo $row['nombre'];?>"/>
</tr>
<tr>
<input name="representante" type="text" id="representante" size="40" value="<?php echo $row['representante'];?>"/>
</tr>
<tr>
<input name="nif" type="text" id="nif" size="40" value="<?php echo $row['nif'];?>"/>
</tr>
<tr>
<input name="domicilio" type="text" id="domicilio" size="40" value="<?php echo $row['domicilio'];?>"/>
</tr>
<tr>
<input name="poblacion" type="text" id="poblacion" size="40" value="<?php echo $row['poblacion'];?>"/>
</tr>
<tr>
<input name="provincia" type="text" id="provincia" size="40" value="<?php echo $row['provincia'];?>"/>
</tr>
<tr>
<input name="cp" type="text" id="cp" size="40" value="<?php echo $row['cp'];?>"/>
</tr>
<tr>
<input name="telefono" type="text" id="telefono" size="40" value="<?php echo $row['telefono'];?>"/>
</tr>
<tr>
<input name="fax" type="text" id="fax" size="40" value="<?php echo $row['fax'];?>"/>
</tr>
<tr>
<input name="credito" type="text" id="credito" size="40" value="<?php echo $row['credito'];?>"/>
</tr>
<tr>
<input name="disponible" type="text" id="disponible" size="40" value="<?php echo $row['disponible'];?>"/>
</tr>
<tr>
<input name="total1" type="text" id="total1" size="40" value="<?php echo $row['total1'];?>"/>
</tr>
$disponible=$credito-$total1;
EOD;

?>
</table>
</form>
Me da el siguiente error:Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\fernando\listadoempresas3.php on line 28
Por favor dime donde puede estar el error-Gracias