I'm using the script below to pull a report. What I want to be able to do is put edit and delete links beside each record so that I can either edit a particular record or delete it all together. What do I need to do? I'm still trying to understand PHP. As you can see I tried creating a delete link but it put the links above the records and it shows the same number links as there are records. And what would I need to do to the SQL statement to make it delete a record if I chose to delete? Please help!!
<?
include ("Header.inc.php");
include ("DBConnection.inc.php");
?>
<html>
<head>
<Title>Retrieving Data from a Database</Title>
<Body>
<?
// Set the Variables for the database access:
$Query = " SELECT * FROM activitytracking WHERE ANumber like '%".$_POST[Keywords]."%' ";
$Result = mysql_db_query ($DBName, $Query, $Link);
print "$Query";
print "<table>";
while ($Row = mysql_fetch_array ($Result)) {
printf("<a href=\"%s?CommID=%s&delete=yes\">(DELETE)</a><br>", $PHP_SELF, $Row["CommID"]);
print "<tr>";
print "<td> $Row[ANumber]</td> <td> $Row[FirstName]</td> <td>$Row[LastName]</td>
<td> $Row[Department]</td> <td> $Row[TeamLeader]</td> <td> $Row[DateOfService]</td>
<td> $Row[NumberOfHours]</td> <td> $Row[ActivityType] <td> $Row[Org]</td></td>
<td> $Row[Description]</td> <td> $Row[TimeTakenWhen]</td> <td> $Row[siteID]</td>";
print "</tr>";
}
print "</table>";
?>