Hi,

If i select 1 or 2 in "selectPay" then, "selectDate" should be filled with "Select date From acc Where date=1 (Or 2)"; How can i do this?

Thanks

<select name="selectPay">
    	<option value=""></option>
    	<option value="1">Pay 1</option>
    	<option value="2">Pay 2</option>				
</select>

<select name="selectDate">
    	<option></option>
</select>

Use an onchange event in the select element. The event should trigger a function which makes an AJAX request to the server side script performing the query. If the request returns an output, it will perform another function to populate the other select element using innerhtml. You can find many AJAX examples and tutorials at AjaxDaddy or on Google.

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.