Ver Mensaje Individual
  #8 (permalink)  
Antiguo 11/06/2013, 11:33
hans2488
 
Fecha de Ingreso: septiembre-2010
Mensajes: 64
Antigüedad: 13 años, 7 meses
Puntos: 5
Respuesta: Funcion cambioar color, cambia a otros colores no establecidos

jcxnet muchas gracias por tu ayuda me sirvio mucho y muchas gracias a todos por responder, dejo mi codigo por si alguien le sirve:
Código PHP:
<!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>
<style type="text/css">
.Alta{background-color:#00ff00}
.Baja{background-color:#5CBFBF}
.Media{background-color:#991C1C}
</style>
</head>
<body>
<?php 
//include('paginator.class.2.php');
include("conexion.php");
$query "SELECT COUNT(*) FROM computadoras";
$result mysql_query($query) or die(mysql_error());
$num_rows mysql_fetch_row($result);


$cadena "select * from computadoras";

$result mysql_query($cadena) or die(mysql_error());
echo 
"<table border='1' width='900px'><tr>
<th>Codigo</th>
<th>Encargado</th>
<th>Prioridad</th>
<th>Fecha del Problema</th>
<th>Numero de Computadora</th>
<th>Detalle</th>
<th>Estado</th>
<th>Fecha Que Se Reparo</th>"
;

while (
$row mysql_fetch_array($result)) 

        echo
"<tr class='{$row[prioridad]}'>
        <td>$row[id]</td> 
        <td>$row[encargado]</td>
        <td>$row[prioridad]</td>
        <td>$row[fechapro]</td>
        <td>$row[numeropc]</td>
        <td>$row[detalle]</td>
        <td>$row[estado]</td>
        <td>$row[fechare]</td>
        </tr>"
;


echo
"</table>";    
?>
</body>
</html>

Última edición por hans2488; 12/06/2013 a las 22:09