Im creating a college management system . So depending on the department and level registered by the student to should go to the required table . I have 9 tables; 3 business administration table for three levels i.e 100level ,200level, 300level
3 Pharmacy table for three levels i.e 100level ,200level, 300level
3 Computer science table for three levels i.e 100level ,200level, 300level
You should try something before posting question. You could probably try this logic:
If pharmacy is selected and particular level is selected then in your PHP script,
<?php
if(isset($_POST['pharmacy']) && $_POST['level']=='100'){
$data = // Place your data here...
$table_name = 'pharmacy_100';
}
else if(isset($_POST['pharmacy']) && $_POST['level']=='200'){
$data = // Place your data here...
$table_name = 'pharmacy_200';
}
else if(isset($_POST['pharmacy']) && $_POST['level']=='300'){
$data = // Place your data here...
$table_name = 'pharmacy_300';
}
// Same for all 3 branches...
?>
Now, you will have $data
variable ready to store in database. By means of SQL connection you can add it in database.