Location: PHPKode > projects > Mozart > Mozart-0.0.4/deltodo.php
<?
// called from: calendar.php
// description: delete entry from the TODO table
//
include("connect.inc");
include("reqlogin.inc");
?>
<html>
<title>Mozart: Delete To Do</title>
<body>
<?

// delete todo from TODO 
$DelToDoSQL = "DELETE FROM todo WHERE todo_id = '$id'";
$DelToDo = mysql_query($DelToDoSQL);

// delete todo from TODOXPROJ
$DelToDoXSQL = "DELETE FROM todoxproj WHERE xtodo_id = '$id'";
$DelToDoX = mysql_query($DelToDoXSQL);

// delete todo from USERXTODO
$DelToDoXUserSQL = "DELETE FROM userxtodo WHERE xtodo_id = '$id'";
$DelToDoXUser    = mysql_query($DelToDoXUserSQL);

$errno = mysql_errno($db);
$error = mysql_error($db);
if ($errno == 0) {
	$Message = "To Do Deleted Successfully";
}
else {
	$Message = "in deltodo.php - Error $errno: $error";
}
include("calendar.php");
?>
</html>
Return current item: Mozart