--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/delete.php Tue May 19 00:30:06 2009 +0100
@@ -0,0 +1,36 @@
+<?php
+ // get request ID to delete
+ $req_ID = $_GET['req_id'];
+
+ $conn = mysql_connect('localhost','root','') or die(mysql_error());
+ mysql_select_db('h4c_db');
+
+ // retrieve cookie if it exists
+ if ($req_ID != "")
+ {
+ $query = mysql_query("DELETE FROM requests_tbl WHERE (req_ID = '$req_ID')");
+ header ('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/details.php?alert=del');
+ }
+
+ mysql_close();
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>H4C - deleting request information...</title>
+<link href="files/h4c_main.css" rel="stylesheet" type="text/css" media="screen" />
+</head>
+
+<body>
+<?php
+ // FOR TEST PURPOSES - CHECK QUERYSTRING
+ //print "req id = " . $req_ID;
+
+ if ($req_ID == "")
+ {
+ print "The search item you requested to delete does not exist. Click the link to return to the <a href='details.php'>search page</a>.";
+ }
+?>
+</body>
+</html>