Jump to content


Photo

Nao Mostra Nenhum Dado...why?


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 Wallace Locus

Wallace Locus

    Turista

  • Usuários
  • 29 posts
  • Sexo:Não informado

Posted 24/01/2009, 19:10

<?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...




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq