This repository is a user management system built using PHP. It includes functionalities for user registration, login, role management, and user blocking.
- User Roles: Admin, and User roles with specific access controls.
- User Authentication: Secure login and registration with password hashing.
- User Blocking: Blocked users are redirected to a specific page.
- File Uploads: Users can upload profile images. All images, except
no_image.png
, are securely encrypted before storage. - Role-Based Access: Different pages and functionalities accessible based on user roles.
-
Clone the repository:
git clone https://github.com/Iqbolshoh/php-user-admin-roles.git cd php-user-admin-roles
-
Import the database:
mysql -u yourusername -p yourpassword < database.sql
-
Configure the database connection in
config.php
:// Example configuration private $conn; public function __construct() { $servername = "localhost"; $username = "root"; $password = ""; $dbname = "Roles"; $this->conn = new mysqli($servername, $username, $password, $dbname); if ($this->conn->connect_error) { die("Connection failed: " . $this->conn->connect_error); } }
Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.
I love connecting with new people and exploring new opportunities. Feel free to reach out to me through any of the platforms below: