marcusdf3
(usa Debian)
Enviado em 20/03/2009 - 14:34h
Pessoal tudo bem ,...!!!
Meu erro e
Warning: Cannot modify header information - headers already sent by (output started at /var/www/site/pesquisa.php:8) in /var/www/site/pesquisa.php on line 41
e
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/site/pesquisa.php on line 64
se alguem puder me ajudar o codigo fonte e esse.. obrigado
<?php
include("connect.php");
$sql="select * from * from registroproblemas orde by codigo";
$result = mysql_query($sql);
if (!$result)
{
header( 'location: erro.php' ) ;
}
echo "<table border='1'>
<tr>
<th>Código</th>
<th>Data</th>
<th>Nome</th>
<th>Descrição do Problema </th>
<th>Solução do Problema </th>
<th>Editar Solução </th>
</tr>";
function codewrap($code, $maxLength = 80)
{
$lines = explode("\n", $code);
$count = count($lines);
for($i=0; $i<$count; ++$i) {
preg_match('`^\s*`', $code, $matches);
$lines[$i] = wordwrap($lines[$i], $maxLength, "\n$matches[0]\t");
}
return implode("\n", $lines);
}
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . " ". str_replace('<br>', '\n', $row['codigo']) . "</td>";
echo "<td>" . " ". $row['data'] . "</td>";
echo "<td>" . " ". $row['nome'] . "</td>";
echo "<td>" . " ". str_replace('\n', '<br>', $row['descricao']) . "</td>";
echo "<td>" . " ". $row['solucao'] . "</td>";
echo "<td> <a href='solucao.php?cod=" . $row['codigo'] . "'><img src='ok.png' style='height: 25px; width: 25px' /></a></td>";
echo "</tr>";
}
echo "</table>";
mysql_close($db)
?>
</body>
</html>
OBRIGADO PELA ATENÇÃO