Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/11/2011, 07:13
Avatar de JoSe__MiGuEl__
JoSe__MiGuEl__
 
Fecha de Ingreso: octubre-2011
Ubicación: Colombia
Mensajes: 51
Antigüedad: 12 años, 10 meses
Puntos: 0
Respuesta: Cambiar el color de td

linuxzero mira este es codigo del body de consulta.php
Código PHP:
<body>
<h1>Gestion de Abastos</h1><Br><Br>
<FORM ACTION="up.php" method=GET"><br><br><bR> 
 <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1 align="center"> 
  <?php  include("conexion.php");  
  
$queEmp "SELECT * FROM registro";     
  
$resEmp mysql_query($queEmp$conexion) or die(mysql_error());     
  
$totEmp mysql_num_rows($resEmp);     
  echo
"<TR>     
  <td><p>Abastos</td>         
  <td><p>Cantidad Minima</td>         
  <td><p>Cantidad Existente</td>         
  <td><p>Ingresar cantidad</td></tr>"
;             
  while (
$rowEmp mysql_fetch_assoc($resEmp)) {         
  echo 
"<tr>         
  <td><p>"
.$rowEmp['nombre']."</td>                 
  <td><p>"
.$rowEmp['cantidad_min']."</td>                 
 <td " 
. ($rowEmp['cantidad_existente'] < $rowEmp['cantidad_min'] ? 'style='color:red;' : '') . "><p>".$rowEmp['cantidad_existente']."</td>
<td valign=middle><p><input type='
text' id='ingresar_cant".$rowEmp['codigo']."' >   <input type='button' onclick='ProcesarFormulario(".$rowEmp['codigo'].")' value='guardar ></td>";
       }
?></TABLE></FORM>
<div id="
dsql" ></div>
<center><a href="
inicio.php">Inicio</a></center>

</body>
</html>
Y esta es la linea numero 61
Código PHP:
<td " . ($rowEmp['cantidad_existente'] < $rowEmp['cantidad_min'] ? 'style='color:red;' : '') . "><p>".$rowEmp['cantidad_existente']."</td
Que hay es conde me dice lo de Parse error: syntax error, unexpected T_STRING
__________________
\m/_ JoSe _\m/