Hi friends this tutorial is about how to display data from database depending on selected drop down value in PHP. Normally have different ways for this work. Here i am using very simple way.
Through java script it is very simple to display data from database depending on selected drop down value.
In this tutorial i use a very simple example like when you select a class from drop down list then all the students of that particular class will display.
Through java script it is very simple to display data from database depending on selected drop down value.
In this tutorial i use a very simple example like when you select a class from drop down list then all the students of that particular class will display.
Now let's start the tutorial:
First of all we create three .PHP files.- connection.php // make connection to database
- index.php // for view class and students.
- get_student.php // get data from database and display on index.php file