Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/02/2011, 11:03
puroestilo66
 
Fecha de Ingreso: febrero-2011
Mensajes: 2
Antigüedad: 14 años
Puntos: 0
Php y mysql ayuda!!

HOLA NECESITO AYUDA!!!
TENGO UN LISTADO DE UNA TABLA Y QUIERO PROGRAMARLE UN IF PARA QUE LAS CELAS CAMBIEN DE COLOR DEPENIENDO EL RESULTADO PERO PONIENDOLE EL ULTIMO IF EL PROGRAMA NO ME CORRE Y NO ME GENERA LO QUE QUIERO ME GUSTARIA QUE ME PUDIERAN AYUDAR!! AQUI LES DEJO LO QUE HE HECHO!!

<?
require_once('class/clsAsistencia.php');
?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title>Sans Titre</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="HAPedit 3.1">
</head>


<body bgcolor="#FCFFAC">
<h6><fieldset>
<strong>
<div id="header" align="center"><br>
<p>REPUBLICA BOLIVARIANA DE VENEZUELA<br />
MINISTERIO DE EDUCACION Y DEPORTES<br />
E.B.B. "ISIDRO RAMON MORENO"<br />
PALO NEGRO - ESTADO ARAGUA</p>
</div>
</strong>
<div align="center">
<a href="menu.html"><img src="imagenes/cerrar.png" alt="" /></a>

</div>
<?
$link = mysql_connect("localhost","root","");

mysql_select_db("escuela", $link);

$result = mysql_query("SELECT fecha, nombre, hora FROM asistencia", $link);

if ($row = mysql_fetch_array($result)){

echo "<table border = '1'> \n";

echo "<tr> \n";

echo "<td><b>Fecha</b></td> \n";

echo "<td><b>Nombre y Apellido</b></td> \n";

echo "<td><b>Hora</b></td> \n";

echo "</tr> \n";


do {

echo "<tr> \n";

echo "<td>".$row["fecha"]."</td> \n";

echo "<td>".$row["nombre"]."</td>\n";

echo "<td>".$row["hora"]."</td>\n";

echo "</tr> \n";

} while ($row = mysql_fetch_array($result));

//echo "</table> style= margin-left: 50"> echo "</table> \n";

} else {

echo "La base de datos esta vacia!";

}
?>

<?
if($hora>8){
$color="#0000FF";
}else{
$color="#00DEFF";
}
echo "<td align=\"right\" bgcolor=\"$color\"</td>";
?>
</body>
<h6><fieldset>
</html>