<?php
//session_start();
echo "<a href='index.php'>voltar</a><br />";
//echo "<a href='exportar.php'>exportar</a><br />";
//echo "<a href='exportar2.php'>exportar2</a><br />";
echo "<a href='exportar3.php'>exportar</a><br />";
$nome = $_GET['id'];
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my", $con);
$result = mysql_query("SELECT * FROM persons WHERE nome='$nome'") or die(mysql_error());
//$result= mysql_query("select (nome, dia, mes, ano, turno, entra, sai) from persons where nome='$id'")
echo "Ver as horas dos funcionarios por: "
echo "<table border='0' style='background-color:#F2B600' align='center'>
<tr>
<th>dia</th>
<th>mes</th>
<th>ano</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr style='background-color:#FFFF66'>";
echo "<td><a href=\"dia.php?id=$nome\">" . $row['dia'] . "</a></td>";
echo "<td><a href=\"mes.php?id=$nome\">" . $row['mes'] . "</a></td>";
echo "<td><a href=\"ano.php?id=$nome\">" . $row['ano'] . "</a></td>";
// echo "<td>" . Diferenca($data1,$data2) . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
ja vi o problema!...
upss..é o url de direcção mal escrito...