Ok, so I have a page that users upload docs from. I put them in a folder and then update a table to show where these docs live. Now, when I go to an edit page I query that database using PHP and echo the location of those files. I'm trying to figure out a way to delete files. I know I need to unlink, but the problem I'm having is I can't seem to figure out how to get the location of each individual file. Here is the code I'm using to get the file locations.
<?php
$sql = 'select trnum, trseq, trfnam, trfloc, podnum
from bd.bdvdocs
where trnum = ' . $_GET['trnum'];
$result = db2_exec($conn, $sql);
if ($result) {
while ($row = db2_fetch_array($result)) {
echo"<tr>";
echo "<td><a href='" . $row[3] . $row[0] . '/' . $row[2] . "'>$row[2]</a> </td>";
echo"</tr>";
}
}
?>
If I add a button to the right of each link and use jquery to get var, it only comes back with the value of the first link. If I click on the second button the page bombs out.