Hi...!
I have a database with tapes. The primary key is ID. I can access the databse without problems and echo the results in a table. But now I want to be able to access to access to more detailed info about each tape.
So... I tought of using the ID field and pass it as a URL variable to the script.
for that I'm using this script:
while ($line = mysql_fetch_assoc($result)) {
echo "<tr>";
echo "<td><a href=\"altera.php?id=".$line['ID'] . "\ >" .$line['ID']. "</a></td>";
echo "<td>" . $line['PGM']. "</td>";
echo "<td>" . $line['DESCRIPTION']. "</td>";
echo "<td>" . $line['TYPE]. "</td>";
echo "<td>" . $line['SUPORT']. "</td>";
echo "<td>" . $line['DATE']. "</td>";
echo "<td>" . $line['STATUS']. "</td>";
echo "<td>" . "</tr>";
}
echo "</table>";
The problem is that when, for instance, my query return the tape ID number "10" as result, the ID that is passed in the URL is 9. :queasy:
If there was another result with ID 55, it would pass 54 as the ID value to the URL variable.
So... After all that explanation, the question is: what do I need to do to make the echoed ID value match the value that is passed as URL variable?
Thanks in advance!