I'm having problems with my permissions system. What I'm trying to add is a feature to add a user group.
When adding the group, we have checkboxes with certain fields that come from information that is stored in the $perms array.
First off, I'm trying to make it so when a checkbox is checked by the permission value, it is 1, if its not checked, the value is 0, that is already done.
When I post my form, the error I receive is:
Fatal error: Unsupported operand types in C:\Program Files\xampp\htdocs\lenix\modules\test.php on line 50
I have never even had that error before.
The $perms array looks like this:
All that displays all fine and everything, the html is perfectly fine, getting the post data shouldn't be a problem.
This is where my code goes wrong:
If anybody can point me in the right, or a better direction, that would be completely awesome, and I would be very thankful.
Thanks in advance.
That particular error can occur when a non-numeric number is being used with the operator. (I was able to recreate this error with your code, but haven't been able to replicate it yet.) When using a string you want to use .= instead.
Without seeing the form it's hard to tell what should be processed in the loops.
I think what might be happening is the post data is being overwritten by one of the lines using the $perms variable. This really depends on how your environment is setup, and how everything is scripted.
Let me know if this helps. If you can provide a more information on what the form is submitting I could probably make more sense of this.
|All times are GMT. The time now is 01:48 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0