Hi.
I'm using this code to pass ID as a URL variable:
$result = mysql_query($query);
// mostrar os dados inseridos
echo "<font size = '12' align='center'> <b> Resultados da pesquisa </b> </font> <P> </P>";
echo "<table border='1'>
<tr>
<th>Cassete Num.</th>
<th>Programa</th>
<th>Descrição Num.</th>
<th>Tipo</th>
<th>Suporte</th>
<th>Data</th>
<th>Categoria</th>
</tr>";
while ($linha = mysql_fetch_assoc($result)) {
echo "<tr>";
echo "<td><a href=\"altera.php?id=".$linha['ID'] . "\ >" .$linha['ID']. "</a></td>";
echo "<td>" . $linha['PGM']. "</td>";
echo "<td>" . $linha['DESCRICAO']. "</td>";
echo "<td>" . $linha['TIPO']. "</td>";
echo "<td>" . $linha['SUPORTE']. "</td>";
echo "<td>" . $linha['DATA']. "</td>";
echo "<td>" . $linha['STATUS']. "</td>";
echo "<td>" . "</tr>";
}
echo "</table>";
The problem is that the ID value that is being passed in the url is allways -1 of the value that is echoed in the table. For instante, if the ID value that is echoed is 55, the argument that is passed in the URL is 54, and so on...
Can someone please help me with this issue?
Thanks in advance!