Bien los codigos son estos
datos.php
Código PHP:
<?
include('config4.php');
function equipo($id)
{
$query = mysql_query("SELECT * FROM inscritos WHERE id=$id");
$clan = mysql_fetch_array($query);
$Nickirc1 = $clan['Nickirc1'];
$Nickzone1 = $clan["Nickzone1"];
$Pais1 = $clan["Pais1"];
$Mail1 = $clan["Mail1"];
$Nickirc2 = $clan["Nickirc2"];
$Nickzone2 = $clan["Nickzone2"];
$Pais2 = $clan["Pais2"];
$Mail2 = $clan["Mail2"];
return '<table width="143" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="108">' . $Nickzone1 . '</td>
<td width="35"><img src="../flags/mini/' . $Pais1 . '.gif"></td>
</tr>
<tr>
<td width="108"><a href="mailto:' . $Mail1 . '">Mail</a></td>
<td width="35"> </td>
</tr>
<tr>
<td width="108">' . $Nickzone2 . '</td>
<td width="35"><img src="../flags/mini/' . $Pais1 . '.gif"></td>
</tr>
<tr>
<td width="108"><a href="mailto:' . $Mail1 . '">Mail</a></td>
<td width="35"> </td>
</tr>
</table>';
}
$equipo1 = equipo(1);
$equipo2 = equipo(2);
$equipo3 = equipo(3);
$equipo4 = equipo(4);
$puntuacionequipo1 = "1";
$puntuacionequipo2 = "0";
$puntuacionequipo3 = "0";
$puntuacionequipo4 = "0";
function Win1round1($puntuacionequipo1,$puntuacionequipo2)
{
if ($puntuacionequipo1 == $puntuacionequipo2) { $Win1round1 = "Por decidir";}
elseif ($puntuacionequipo1 > $puntuacionequipo2) { $Win1round1 = $equipo1;}
elseif ($puntuacionequipo1 < $puntuacionequipo2) { $Win1round1 = $equipo2;}
return "$Win1round1";
}
function Win2round1($puntuacionequipo3,$puntuacionequipo4)
{
if ($puntuacionequipo3 == $puntuacionequipo4) { $Win2round1 = "por decidir";}
elseif ($puntuacionequipo3 > $puntuacionequipo4) { $Win2round1 = $equipo3;}
elseif ($puntuacionequipo3 < $puntuacionequipo4) { $Win2round1 = $equipo4;}
return "$Win2round1";
}
$Win1round1 = Win1round1($puntuacionequipo1,$puntuacionequipo2);
$Win2round1 = Win2round1($puntuacionequipo3,$puntuacionequipo4);
?>
brackets.php
Código PHP:
<?
include('datos.php');
echo '<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="131" align="center">' . $equipo1 . '</td>
<td rowspan="4" width="118">' . $Win1round1 . '</td>
<td rowspan="4" width="143"> </td>
</tr>
<tr>
<td align="center" width="131">vs</td>
</tr>
<tr>
<td rowspan="2" width="131" align="center">' . $equipo2 . '</td>
</tr>
<tr> </tr>
<tr>
<td width="131" align="center">' . $equipo3 . '</td>
<td rowspan="5" width="118">' . $Win2round1 . '</td>
<td rowspan="7" width="143"> </td>
</tr>
<tr>
<td align="center" width="131">vs</td>
</tr>
<tr>
<td rowspan="2" width="131" align="center">' . $equipo4 . '</td>
</tr>
<tr> </tr>
</table>';
?>
y bien la cuestion es que si:
$puntuacionequipo1 = "0";
$puntuacionequipo2 = "0";
es igual se muestra "Por decidir"
pero si lo cambio a:
$puntuacionequipo1 = "1";
$puntuacionequipo2 = "0";
Ya no me refleja nada,por que?