Thanks for the help guys but I'm not having any success. I'm getting this error. The name of this page is called results.php. As you can see I'm trying to create a href beside each record that will allow me to edit or delete that record. Line 46 is in bold. I've also included the delete query that I'm trying to use in connection with the herf. What am I missing?
Parse error: parse error, unexpected T_STRING in c:\program files\apache group\apache\htdocs\communityservice\results.php on line 46
<?
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 DateOfService BETWEEN '%".$POST[txtStartDate]."%' AND '%".$POST[txtEndDate]."%' GROUP BY SiteID";
$Result = mysql_db_query ($DBName, $Query, $Link);
// run SQL against the DB
$Result = mysql_query($Query);
echo "Record deleted!<p>";
if ($delete) {
// delete a record
$$Query = "DELETE FROM activitytracking WHERE CommID=$CommID";
$result = mysql_query($Query);
echo "Record has been deleted!<p>";
}
//print "$Query";
print "<table border=1 align=center >";
while ($Row = mysql_fetch_array ($Result)) {
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>
[b]<td>"<a href=results.php?var1=$var1_value&var2=$var2_value> $Row[Department]</a>"</td> ;[/b]
print "</tr>";
} print "</table>";
?>