can I get code to bring out the state under a country when the country is selected. both state & country from the database displayed in a select dropdown

Recommended Answers

So what do you want from us? Show your code if you want help with it. I take it you weren't expecting us to write something for you.

Jump to Post

All 4 Replies

Member Avatar

So what do you want from us? Show your code if you want help with it. I take it you weren't expecting us to write something for you.

I actually want to use it for selecting staff in a particular department.
I need what to write inside function displayStaff;

$tp='
<select name="department" onchage="displayStaff()">
while(list($x,$v))=each($department){
$tp.='
<option value="'.$v[dept_nr].'">';
$tp.=$v[departments];
$tp.=' </option>  ';
}
echo $tp.="</select>";





<select name="staffs">

...the staff for selected department should come up
but all the staffs do come up

</select>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.