This code example assumes you know how to use Objects, Classes and Interfaces, if you do not
please take a look at these articles i wrote to help people understand these topics.
I have not included an example here because it would mean that i would need to include all code in this text as well, however the code is extremely commented with very descriptive comments.
This is a small example of what you can do with PHP 5, ofcourse you could do all of this with
previous versions of PHP however this example will get you off and running with PHP 5.
Before you can use this example you need to do a few things.
1.) Create a database called 'security'
2.) Import the data using the included security.sql file
3.) Place the directory structure in your web directory
4.) Edit the global.php file and change the 2 define statements SITE_URL and SITE_PATH
5.) Add a user to the members table in the database.
6.) Add the user to roles.
7.) login using the email, password you used when you setup the user.
NOTE: You can login using
username: user@domain.com
password: test
This is a pre-setup user i have created for you to play with.
When adding a user to roles, you need to add the users id and the roles id to the members_roles
table.
Any questions or need help, just post comments and i will get back to you ;)