{"id":34269763,"url":"https://github.com/ashawkat/oop-php-authentication-system","last_synced_at":"2026-03-14T22:14:05.956Z","repository":{"id":9470752,"uuid":"11355315","full_name":"ashawkat/oop-php-authentication-system","owner":"ashawkat","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-28T20:16:49.000Z","size":99,"stargazers_count":13,"open_issues_count":0,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-20T07:41:45.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashawkat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-11T23:02:24.000Z","updated_at":"2025-11-28T20:16:55.000Z","dependencies_parsed_at":"2022-09-20T18:45:08.707Z","dependency_job_id":null,"html_url":"https://github.com/ashawkat/oop-php-authentication-system","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ashawkat/oop-php-authentication-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkat%2Foop-php-authentication-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkat%2Foop-php-authentication-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkat%2Foop-php-authentication-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkat%2Foop-php-authentication-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashawkat","download_url":"https://codeload.github.com/ashawkat/oop-php-authentication-system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkat%2Foop-php-authentication-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30519440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T19:51:21.629Z","status":"ssl_error","status_checked_at":"2026-03-14T19:51:12.959Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-16T19:00:22.851Z","updated_at":"2026-03-14T22:14:05.920Z","avatar_url":"https://github.com/ashawkat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OOP PHP Authentication System\n\nA robust, object-oriented PHP authentication system featuring user registration, login, and session management. Recently modernized with a sleek UI and improved security practices.\n\n## Features\n\n-   **Object-Oriented Design**: Built using PHP classes for modularity and maintainability.\n-   **Secure Authentication**:\n    -   User Registration and Login.\n    -   Session Management.\n    -   Password Hashing (MD5 - *Note: Consider upgrading to `password_hash` for production*).\n-   **Modern UI**:\n    -   **Bootstrap 5**: Utilizes the latest Bootstrap 5 via CDN for responsive design.\n    -   **Custom Typography**: Uses 'Plus Jakarta Sans' for a modern, clean look.\n    -   **Enhanced UX**: Floating labels, card-based layouts, and smooth transitions.\n-   **Client-Side Validation**:\n    -   Real-time form validation using vanilla JavaScript.\n    -   User-friendly error messages (no annoying alerts).\n    -   Email format and password strength checks.\n\n## Requirements\n\n-   PHP 8.0 or higher.\n-   MySQL Database.\n-   Web Server (Apache/Nginx) or PHP built-in server.\n\n## Installation \u0026 Setup\n\n1.  **Clone the Repository**\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd oop-php-authentication-system\n    ```\n\n2.  **Database Setup**\n    -   Create a new MySQL database named `oop_log_mod`.\n    -   Import the provided SQL file:\n        ```bash\n        mysql -u root -p oop_log_mod \u003c users.sql\n        ```\n\n3.  **Configuration**\n    -   Open `include/db_config.php`.\n    -   Update the database credentials to match your environment.\n    -   **For MAMP Users**:\n        ```php\n        define('DB_PASSWORD', 'root'); // Default MAMP password\n        // ...\n        $this-\u003econnection = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_DATABASE, 8889, '/Applications/MAMP/tmp/mysql/mysql.sock');\n        ```\n\n4.  **Run the Application**\n    -   **Using PHP Built-in Server**:\n        ```bash\n        php -S localhost:8000\n        ```\n        Access at: `http://localhost:8888/login.php`\n    -   **Using MAMP/XAMPP**:\n        Place the folder in `htdocs` and access via your local server URL (e.g., `http://localhost:8888/oop-php-authentication-system/login.php`).\n\n## Folder Structure\n\n-   `assets/`: CSS and JavaScript files.\n    -   `css/style.css`: Custom styles and overrides.\n    -   `js/script.js`: Form validation logic.\n-   `include/`: PHP classes and partials.\n    -   `class.user.php`: Core user logic.\n    -   `db_config.php`: Database connection settings.\n    -   `header.php` \u0026 `footer.php`: Shared layout files.\n-   `login.php`: User login page.\n-   `registration.php`: User registration page.\n-   `home.php`: Protected dashboard page.\n\n## Credits\n\nOriginal tutorial by [Adnan for W3Programmers](https://www.w3programmers.com/login-and-registration-using-oop/).\nRefactored and modernized by [Adnan](https://adnanshawkat.me).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashawkat%2Foop-php-authentication-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashawkat%2Foop-php-authentication-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashawkat%2Foop-php-authentication-system/lists"}