Hi.....is this code right.........
<html>
<head><title>auto alto system</title></head>
<body>
<table>
<tr>
<td> category</td>
<td><select name="category">
<option value="sercategory">service category</option>
<option value="servicetype">service type</option>
<option value="services">services</option>
</select></td>
</tr>
</table>
<?php
include 'database.php';
$result = mysql_query("SELECT * FROM service_category ");
while($row = mysql_fetch_array($result))
{
echo $row['servicec'];
echo "<br />";
}
if($_POST['category'] == "servicetype")
{
$result = mysql_query("SELECT * FROM service_type ");
while($row = mysql_fetch_array($result))
{
echo $row['servicet'];
echo "<br />";
echo 'error';
}
}
else
{
echo 'error';
}
if($_POST['category'] == "services")
{
$result = mysql_query("SELECT * FROM services ");
while($row = mysql_fetch_array($result))
{
echo $row['servicess'];
echo "<br />";
}
}
else
{
echo 'error';
}
mysql_close();
?>
</body>
</html>