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

All 4 Replies

Member Avatar for diafol

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 meeting, networking, learning, and sharing knowledge.