Code: Select all
Not yet open :Blue
Open : Green
Processing : Amber
Closed : Grey
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Tickets</title>
<link href="loginmodule.css" rel="stylesheet" type="text/css" />
<link href="ticket.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>My search results</h1>
<?php
include('connect-db.php');
$select = $_POST['id'];
$searchdb = $_POST['searchdb'];
// make the query
$query = "SELECT id, name, issue, status
FROM data
WHERE $select LIKE '%$searchdb%'ORDER BY id DESC";
$result = @mysql_query($query);
// run query
if ($result) { // If it ran OK, display the records.
// Table header.
echo '<table id="ticket">
<tr>
<th align="left"><b>Ticket No:</b></th>
<th align="left"><b>Name:</b></th>
<th align="left"><b>Issue:</b></th>
<th align="left"><b>Status:</b></th>
<th align="left"><b>view</b></th></tr>';
// Fetch and print all the records.
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<tr><td align="left">' . $row['id'] . '</td>
<td align="left">' . $row['name'] . '</td>
<td align="left">' . $row['issue'] . '</td>
<td align="left">' . $row['status'] . '</td>
<td align="left"><a href="agentview.php?id=' . $row['id'] . '">View</a></td></tr>';
}
} else {
echo "OOPS I don't have your information .";
}
echo '</table>';
?>
</body>
</html>
Result should something look like this
[text]ID + Name + Issue + Status + [/text]
[text]12345 + Xyz + Error 404 + Not yet Opened + [/text]
[text]12346 + Xyz + Error 404 + Opened + [/text]