I want to display how to implement the corresponding destdephp file based on the different job values of each person stored in the database.

Source: Internet
Author: User
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 ;}
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.