topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday April 27, 2024, 2:53 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Login Script with PHP and SQLite  (Read 265 times)

KynloStephen66515

  • Animated Giffer in Chief
  • Moderator
  • Joined in 2010
  • *****
  • Posts: 3,741
    • View Profile
    • Donate to Member
Login Script with PHP and SQLite
« on: March 13, 2024, 10:37 PM »
Login Script with PHP and SQLite

This repository contains a simple and secure login script implemented in PHP with an SQLite database for user authentication. The script offers features such as:

User registration: Users can create new accounts by providing a username, email, and password.
User login: Registered users can log in using their credentials to access their dashboard.
User dashboard: After logging in, users are redirected to their personalized dashboard where they can view their profile information and submit messages.
Message submission: Users can submit messages through a form on their dashboard.
Public messages: All users can view the public messages submitted by other users.
User messages: Users can view and manage their own messages, including editing and deleting them.

Requirements

  • PHP 7.0 or higher
  • SQLite3 extension enabled
  • Web server (e.g., Apache, Nginx)
  • Python 3.x (for running the database creation script)

Setup

  • Clone the repository to your local machine.
  • Run the cr_db.py script to create the SQLite database file.
  • Configure your web server to serve the PHP files.
  • Access the login page (index.php) in your browser and start using the script.

Usage

  • Navigate to the login page (index.php).
  • Enter your username/email and password.
  • Click on the "Login" button.
  • Upon successful authentication, you will be redirected to the dashboard page (dashboard.php).

Security

  • Passwords are securely hashed using PHP's built-in password_hash() function before storing them in the database.
  • User input is sanitized and validated to prevent SQL injection and cross-site scripting (XSS) attacks.
  • Sessions are used to manage user authentication and maintain logged-in state.

License

This project is licensed under the MIT License. See the LICENSE file for details.

GitHub Repository

Visit the KynlosLoginScript repository for more information.

Contributions

Contributions are welcome! Feel free to open issues and pull requests to suggest improvements or report bugs. Donations towards the project are also HIGHLY welcomed!