hi guys
i have a table with employee name and department name like(hardware,software,networking) now i retrieve department names from data base in first combo box now i want that when i choose hardware it displays the names of employees which are in hardware dept like this
kindly help me in this regards how can i do this
waiting for ur replies
geting data in combo box from database
Moderator: General Moderators
Re: geting data in combo box from database
Hello,
Please implement the onchange() function in select box ie
<select name="example" onchange="">
<option value="Hardware">Hardware</option>
<option value="Hardware">Software</option>
</select>
then pass the value from the combobox to sql query using the ajax or javascript to fetch the corresponding dept employee details..
Regarding the ajax and passing values please find the following link..
http://www.tizag.com/ajaxTutorial/ajax- ... tabase.php
Regards,
Please implement the onchange() function in select box ie
<select name="example" onchange="">
<option value="Hardware">Hardware</option>
<option value="Hardware">Software</option>
</select>
then pass the value from the combobox to sql query using the ajax or javascript to fetch the corresponding dept employee details..
Regarding the ajax and passing values please find the following link..
http://www.tizag.com/ajaxTutorial/ajax- ... tabase.php
Regards,