Submit form JavaScript onChange

This tutorial example shows how to submit form automatically when a radio button is selected. The below example has two radio buttons and when one of them is selected then the form gets submitted and displays the corresponding value.

Sometimes we need to submit the form automatically and then we need to do some funther processing. We can submit form automatically on onClick, onChange javascript events which can be applied on many tags like <select/>, input type radio, input type checkbox etc. Continue reading “Submit form JavaScript onChange”

Dependent dropdown example in PHP, MySQL

This tutorial shows how to create dependent dropdown in PHP and MYSQL. This is also called cascaded dropdown. This tutorial uses JavaScript to submit the form automatically when the first dropdown value is selected.

Sometimes we need to create such a cascaded dropdown when we need to select some value in the second dropdown based on first dropdown value or third dropdown value based on second dropdown value.

For example, we need to select city dropdown value based on country dropdown value and for this we cannot pre-populate the city dropdown value unless we know the country from country dropdown. Continue reading “Dependent dropdown example in PHP, MySQL”