<?php
include(“connection.php”);
if($_SESSION[“UserId”]==””)
{
$_SESSION[“lgnError”] = “<p class=\”lgnShowError\” id=\”errUserId\”>Please login…</p>”;
$_SESSION[“lgnError”] = $_SESSION[“lgnError”].”<p class=\”lgnError\” id=\”errPassword\”></p>”;
header(“Location:home.php”);
}
?>
<?php

if($_POST[‘id’])
{
//print_r($_REQUEST); die;
$id=$_POST[‘id’];
$sql=mysql_query(“select * from category where main_cat_id = ‘$id'” );

while($row=mysql_fetch_array($sql))
{
$id=$row[‘id’];
$data=$row[‘cat_name’];
echo ‘<option value=”‘.$id.'”>’.$data.'</option>’;

}
}

?>