I want to display how the corresponding destdephp file is implemented based on the different job values of each person stored in the database.
Seek guidance from beginners
Reply to discussion (solution)
It's okay. Why can't it be implemented?
Where did you write this code? In the template file or in the php script file? Why not What about it?
It's okay. Why can't it be implemented?
None of the referenced files are displayed.
$ Station = $ _ POST ['Station '];
Is this wrong?
Where did you write this code? In the template file or in the php script file? Why not What about it?
Php script file
Forget this. I will try it.
Where did you write this code? In the template file or in the php script file? Why not What about it?
$ Station = ""; // The database value is station. this parameter must be set to station.
Switch ($ station ){
Case 'commodity quota ':
Echo include "table_foot_zs.php ";
Break;
Case 'website Project ':
Echo include "table_foot_cx.php ";
Break;
Case 'store on behalf of operation ':
Echo include "table_foot_dyy.php ";
Break;
Case 'magpie Bridge merchants ':
Echo include "table_foot_qq.php ";
Break;
}
?>
Where did you write this code? In the template file or in the php script file? Why not What about it?
$ Station = ""; // The database value is station. this parameter must be set to station.
Switch ($ station ){
Case 'commodity quota ':
Echo include "table_foot_zs.php ";
Break;
Case 'website Project ':
Echo include "table_foot_cx.php ";
Break;
Case 'store on behalf of operation ':
Echo include "table_foot_dyy.php ";
Break;
Case 'magpie Bridge merchants ':
Echo include "table_foot_qq.php ";
Break;
}
?>
I don't quite understand your description. Please describe your problem in detail
First, only one php script can exist. An error must be reported if the number is too large.
In addition, why echo the include file? This is not necessary.
I don't know what you want to express
$ Station = array ('work' => 'commodity merchants '); // $ station is an array retrieved from the database, for example, $ station = array ('work' => 'commodity quota') switch ($ station ['work']) {case 'commodity quota': include "table_foot_zs.php"; break; case 'website Project': include "table_foot_cx.php"; break; case 'shop generation operation': include "table_foot_dyy.php"; break; case 'magpie Bridge quota': include "table_foot_qq.php "; break ;}