Not having a lot of luck with this scipt are we? And you didn't heed my advice about printing out the variables and queries did you?

Your link to the delete page:
PHP Code:
<? echo ("<a href='$PHP_SELF?deletetask=$taskid'>delete task</a></td>");?>
Sets the var 'deletetask' to the the value of $taskid.
Then on the reloading of the page, you try to set $taskid = $_POST['ID']. This 'ID' variable never exists.
Try this:
PHP Code:
<?php
//Define Global Variables
$PHP_SELF = $_SERVER['PHP_SELF'];
$submittask = $_POST['submittask'];
$brand = $_POST['brand'];
$item = $_POST['item'];
$size = $_POST['size'];
$color = $_POST['color'];
$imgloc = $_POST['imgloc'];
$imgname = $_POST['imgname'];
$request = $_POST['request'];
$category = $_POST['category'];
$comments = $_POST['comments'];
$taskid = $_GET['deletetask'];
if (isset($_REQUEST['addtask'])): // If the user wants to add a task
?>
<form action="<? echo $PHP_SELF ; ?>" method="post">
<table width="100%">
<tr id="grey">
<td id="leftcolumn">Type Of Request</td>
<td><select name="request">
<option selected="selected">Type of Request</option>
<option value="addproduct">Add New Product</option>
<option value="changestatus">Change Status</option>
<option value="removeproduct">Remove Product</option>
</select></td>
</tr>
<tr>
<td id="leftcolumn">Category: </td>
<td><select name="category">
<option selected="selected">Choose A Category</option>
<option value="Shoes">Shoes</option>
<option value="Decks">Decks</option>
<option value="Trucks">Trucks</option>
<option value="Wheels">Wheels</option>
<option value="Apparel">Apparel</option>
<option value="Bags">Bags</option>
<option value="Acessories">Accessories</option>
<option value="Videos">Videos</option>
<option value="FTC">FTC</option>
<option value="Blowout">Blowout</option>
</select></td>
</tr>
<tr id="grey">
<td id="leftcolumn">Brand:</td>
<td><input name="brand" type="text" />
(ex. </td>
</tr>
<tr>
<td id="leftcolumn">Item:</td>
<td><input name="item" type="text" /></td>
</tr>
<tr id="grey">
<td id="leftcolumn">Size:</td>
<td><input name="size" type="text" /></td>
</tr>
<tr>
<td id="leftcolumn">Color:</td>
<td><input name="color" type="text" /></td>
</tr>
<tr id="grey">
<td id="leftcolumn">Image Location</td>
<td><input name="imgloc" type="text" /></td>
</tr>
<tr>
<td id="leftcolumn">Image Filename:</td>
<td><input name="imgname" type="text" id="imgname" /></td>
</tr>
<tr id="grey">
<td id="leftcolumn">Additional Comments:</td>
<td><textarea name="comments" cols="40" rows="10"></textarea></td>
</tr>
<tr id="grey">
<td id="leftcolumn"><input type="submit" name="submittask" value="SUBMIT" /></td>
<td> </td>
</tr>
</table>
</form>
<?php
else: // Default page display
// Connect to the database server
$dbcnx = @mysql_connect("localhost", "root", "********");
if (!$dbcnx) {
echo( "<p>Unable to connect to the database server at this time.</p>" );
exit();
}
// Select the news database
if (! @mysql_select_db("test") ) {
echo( "<p>Unable to locate the database at this time.</p>" );
exit();
}
// If a story has been submitted,
// add it to the database.
if ($submittask == "SUBMIT") {
$sql = "INSERT INTO tasks SET
brand='$brand',
item='$item',
size='$size',
color='$color',
imgloc='$imgloc',
imgname='$imgname',
taskDate=CURDATE(),
request='$request',
category='$category',
comments='$comments'";
if (@mysql_query($sql)) {
echo("<p>Your task has been added.</p>");
} else {
echo("<p>Error adding submitted task: " .
mysql_error() . "</p>");
}
}
//If A Task Has Been Deleted
if (isset($_REQUEST['deletetask'])) {
$sql = "DELETE FROM tasks WHERE ID=$taskid";
if (@mysql_query ($sql) ) {
echo ("<p>Task Has Been Deleted.</p>");
}
else {
echo ("<p>Error Deleting Task. Please Try Again.</p>");
}
}
echo("<p> Here are all the requests in our database: </p>");
// Request the text of all the stories
$result = @mysql_query("SELECT ID, category, item, request FROM tasks");
if (!$result) {
echo("<p>Error performing query: " . mysql_error() . "</p>");
exit();
}
// Display the text of each story in a paragraph
echo ("<table width='90%'>");
echo ("<tr bgcolor='#999999'>
<td width='10%'><div align='center'><font color='#FFFFFF'><strong><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Task ID</font></strong></font></div></td>
<td width='20%'><div align='center'><font color='#FFFFFF'><strong><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Category</font></strong></font></div></td>
<td width='30%'><div align='center'><font color='#FFFFFF'><strong><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Item</font></strong></font></div></td>
<td width='20%'><div align='center'><font color='#FFFFFF'><strong><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Type</font></strong></font></div></td>
<td width='20%'><div align='center'><font color='#FFFFFF'><strong><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Remove</font></strong></font></div></td>
</tr>");
while ( $row = mysql_fetch_array($result) ) {
$taskid = $row["ID"];
//End PHP ?>
<tr>
<td align="center"><? echo ( $row['ID'] ); ?></td>
<td align="center"><? echo ( $row['category'] ); ?></td>
<td align="center"><? echo ( $row['item'] ); ?></td>
<td align="center"><? echo ( $row['request'] ); ?></td>
<td align="center"><? echo ("<a href='$PHP_SELF?deletetask=$taskid'>delete task</a></td>");?>
</tr>
<?
}
echo ("</table>");
// When clicked, this link will load this page
// with the news submission form displayed.
echo("<p><a href=$PHP_SELF?addtask=1>Add a New Task</a></p>");
endif;
?>
Bookmarks