hi guys
sorry for common title but really didn't find proper title for this problem
please see my code
Code:
$(document).ready(function(){
			$("select#heading").attr("disabled","disabled");
            $("select#type").attr("disabled","disabled");
            $("select#category").change(function(){
				//$("select#heading").attr("disabled","disabled");
            	$("select#type").attr("disabled","disabled");
            	$("select#type").html("<option>wait...</option>");
				
            	var id = $("select#category option:selected").attr('value');
            $.post("select_type.php", {id:id}, function(data){
                $("select#type").removeAttr("disabled");
                $("select#type").html(data);
				
				$("select#type").change(function(){
					var id2 = $("select#type option:selected").attr('value');
					$.post("select_heading.php", {id2:id2}, function(){
					$("select#heading").removeAttr("disabled","disabled");
            	    $("select#heading").html(data)
					});
            });
        });
			}); });
This is cascade selection script code.
There are 3 selection
first - category, second - type, third -heading
When i run this script the selection list of heading(3rd) & type(2nd) both are same.
here is my other code which supply dynamic data string to various selection's
Code:
<?php
class SelectList
{
    protected $conn;

        public function __construct()
        {
            $this->DbConnect();
        }

        protected function DbConnect()
        {
            include "moviecon.php";
            $this->conn = mysql_connect($host,$user,$password) OR die("Unable to connect to the database");
            mysql_select_db($db,$this->conn) OR die("can not select the database $db");
            return TRUE;
        }

        public function ShowCategory()
        {
            $sql = "SELECT * FROM smf_boards";
            $res = mysql_query($sql,$this->conn);
            $category = '<option value="0">choose...</option>';
            while($row = mysql_fetch_array($res))
            {
                $category .= '<option value="' . $row['id_board'] . '">' . $row['name'] . '</option>';
            }
            return $category;
        }

        public function ShowType()
        {
            $sql ="SELECT * FROM smf_messages, smf_topics WHERE smf_topics.id_first_msg=smf_messages.id_msg AND smf_messages.id_board=$_POST[id] ORDER BY subject";
            $res = mysql_query($sql,$this->conn);
            $type = '<option value="0">choose...</option>';
            while($row = mysql_fetch_array($res))
            {
                $type .= '<option value="' . $row['id_topic'] . '">' . $row['subject'] . '</option>';
            }
            return $type;
        }
		 
		 public function ShowHead()
        {
			
            $sql = "SELECT * FROM smf_spiders";
            $res = mysql_query($sql,$this->conn);
            $head = '<option value="0">choose...</option>';
            while($row = mysql_fetch_array($res))
            {
                $head .= '<option value="' . $row['id_board'] . '">' . $row['name'] . '</option>';
            }
            return $head;
        }
}

$opt = new SelectList();
?>
please replay.
thanks in advance