Foros del Web » Creando para Internet » Diseño web »

Error al validar

Estas en el tema de Error al validar en el foro de Diseño web en Foros del Web. Me han pasado un calendario php, pero estoy haciendo pruebas, y a la hora de validar me dan errores a la hora de validarlo donde ...
  #1 (permalink)  
Antiguo 23/03/2010, 04:19
 
Fecha de Ingreso: febrero-2007
Mensajes: 165
Antigüedad: 17 años, 2 meses
Puntos: 0
Error al validar

Me han pasado un calendario php, pero estoy haciendo pruebas, y a la hora de validar me dan errores a la hora de validarlo donde me da error es donde lo pongo en negrita

echo '
<div style="width:190px">
<table summary="Esta tabla contiene el calendario" cellpadding="0" cellspacing="0" id="calendario" align="center">
<thead><tr><th colspan="7"> <a href="?ladata='.$anteriorMes.'" title="mes anterior"><img src="images/anterior.gif" alt="Anterior"/>
</a> '.utf8_encode($nomMes).' '.$anio.' <a href="?ladata='.$proximMes.'" title="proximo mes"><img src="images/siguiente.gif" alt="Siguente"/>
</a></th></tr></thead>

' ;
echo '<tr>
<th>L</th><th>M</th><th>M</th><th>J</th><th>V</th><th>S</th><th>D</th>
</tr>';
echo '<tr>';
for ($i = 1; $i <= ($dias + $sum); $i++) {
// Dias de otro mes, no mostraremos nada
if (!$start) if ($i <= 7 && $i == $diaset) {
$start = true; $sum = $i - 1;

} else {
echo '<td class="inactivo"></td>';
}
if ($start) {

if (($i - 1) % 7 == 0) echo '</tr>';
if ($i == ($hoy + $sum) && ($mes == date('m')) && ($anio == date('Y')) ) {
$complet = $anio.'-'.$mes.'-'.($i - $sum ); // Fecha completa formato 2007-12-31
// Hoy
echo '
<td class="hoy">';
$consulta = "SELECT * FROM agenda WHERE fecha='$complet'";
$resp = mysql_query($consulta);
if ($dades=mysql_fetch_array($resp)) {
echo '<p><a title="' . $dades['evento'] . '"href="veragenda.php?fecha=' . $dades['fecha'] . '"class="aCal">' . ($i - $sum ). '</a></p>';
}else{
echo $hoy;
}
echo '</td>';
} elseif (in_array($i-$sum, $array_dias)) {
// Dia que hay algun evento
echo '<td class="evento">';
$complet = $anio.'-'.$mes.'-'.($i - $sum );
$consulta = "SELECT * FROM agenda WHERE fecha='$complet'";
$resp = mysql_query($consulta);
if ($dades=mysql_fetch_array($resp)) {
echo '<p><a title="' . $dades['evento'] . '"href="veragenda.php?fecha=' . $dades['fecha'] . '"class="aCal">' . ($i - $sum ). '</a></p>';
}
echo '</td>';
} else {
// Dia que no hay nada
echo '
<td>
' . ($i - $sum ) .'
</td>';
}
}
}
echo '
</tr></table></div><br />
';
  #2 (permalink)  
Antiguo 23/03/2010, 06:14
Avatar de eulloa  
Fecha de Ingreso: octubre-2007
Ubicación: Donde caiga la noche, si mi hijo me deja
Mensajes: 691
Antigüedad: 16 años, 6 meses
Puntos: 5
Respuesta: Error al validar

¿Y porqué método sabríamos los demás q error es el q te da?
  #3 (permalink)  
Antiguo 23/03/2010, 08:33
 
Fecha de Ingreso: febrero-2007
Mensajes: 165
Antigüedad: 17 años, 2 meses
Puntos: 0
Respuesta: Error al validar

AL validar la web a traves de W3c me da un error:

Line 235, Column 22: end tag for "tr" which is not finished
</tr><tr></tr><tr>

La linea del error es justo despues de:

echo '<tr>
<th>L</th><th>M</th><th>M</th><th>J</th><th>V</th><th>S</th><th>D</th>
</tr>';
  #4 (permalink)  
Antiguo 23/03/2010, 08:55
Avatar de eulloa  
Fecha de Ingreso: octubre-2007
Ubicación: Donde caiga la noche, si mi hijo me deja
Mensajes: 691
Antigüedad: 16 años, 6 meses
Puntos: 5
Respuesta: Error al validar

Pues te lo dice bien claro, revisa q todos los tr estén cerrados. De todas formas esto no tiene q ver con PHP
salu2
  #5 (permalink)  
Antiguo 23/03/2010, 08:56
 
Fecha de Ingreso: febrero-2007
Mensajes: 165
Antigüedad: 17 años, 2 meses
Puntos: 0
Respuesta: Error al validar

Por eso pregunto aqui, ya que yo no lo termino de ver
  #6 (permalink)  
Antiguo 23/03/2010, 09:23
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Tema movido desde PHP a Web general
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:01.