Okay so I had been trying this for very long . But i couldn't succeed so i need your kind help .
In another file I had submitted my entries into databse with no problems .Now i created a file ppp.html file to help user update database . here is ppp.html
<html>
<form action="l.php" method="post">
<input type ="text" name ="complaint">
<input type="text" name="dte"></input>
<input type="submit"></input>
</form>
</html>
I diverted the file to l.php .The function of l.php will be to show data from database . i have added one condition in query where category=$complaint .it works properly but now i need two conditions where category =$complaint and also where dte=$date How to do that . Here is l.php file
<?php
$complaint = "";
if (isset($_POST['complaint'])) {
$complaint = $_POST['complaint'];
}
$dte = "";
if (isset($_POST['date'])) {
$dte = $_POST['date'];
}
mysql_connect("localhost", "root", "") or die("couldnt attack ");
mysql_select_db("site")or die('i surrender');
$query = ("SELECT * FROM site2 where category='$complaint'") or die("couldnt select");
$result = mysql_query($query) or die('hghyt');
while ($complaint = mysql_fetch_array($result)) {
echo"<td>" . '<br>' . $complaint['category'] . "</tr>";
echo "<td>" . '<br>' . $complaint['quantity'] . "</tr>";
echo "<td>" . '<br>' . $complaint['place'] . "</tr>";
echo "<td>" . '<br>' . $complaint['dte'] . "</tr>";
ECHO"<TR>" . "<A HREF='update.php?complaint=" . $complaint['category'] . "'>" . "UPDATE" . "</A>";
echo "<br/>";
ECHO"</table>";
}
?>