Php multi-choice button value or de-value for a php permission management, you need to use the multi-choice button to do, for example, the administrator wants to give a common user a permission, is to show him what he can see or make comments in that place, how should he write code? Thank you! ------ Solution ------------------ Basic code $ dict & nbsp; array () php multiple-choice button value or de-value
For php permission management, you need to select multiple buttons. for example, the administrator wants to give a common user a permission, that is, to give him what he can see or where he can make comments, how should I write code like this? Thank you!
------ Solution --------------------
Basic code
$dict = array();
if($_SERVER['REQUEST_METHOD'] == "POST") {
echo array_sum($_POST['r']);
$dict = $_POST['r'];
}
echo '';
------ Solution --------------------
The basic code has been provided to you,
At this time, you need to use your thinking to implement it from theory to practice.
For example
Customer management, contract management, financial management, work order management, basic management
01110
0 indicates permission control.
1. the code has no permission control.
Write data to the database, and then compare it when reading data. The corresponding executable permissions are given.
------ Solution --------------------
You cannot determine the checked attribute of the checkbox.
------ Solution --------------------
When you output the checkbox, you can judge it. refer to the moderator's code.
------ Solution --------------------
Reference:
Reference: you cannot determine the checked attribute of the checkbox.
1. 0: No. Is that true? But how does it automatically hook when it knows 1?
/>
------ Solution --------------------
The permission list can be one-to-one matched with the basis for judgment.
When displayed on the page, you can determine the value to control the checked attribute of the checkbox.
------ Solution --------------------
#10 it's very clear. you always emphasize that you are a newbie. if you don't even know html, no one else can help you.
Write the following two sentences in html to see the difference.
------ Solution --------------------
Sent and checked