Skip to content

A secure PHP application with login, logout, and CRUD functionality for managing user data.

Notifications You must be signed in to change notification settings

younisyousaf/login_crud_php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRUD With Login in PHP

Description

This project is a secure PHP application that offers user authentication (login and logout) and CRUD (Create, Read, Update, Delete) functionalities for managing user data. It demonstrates the fundamentals of session management, database interaction, and form handling in PHP.

Features

  • User Authentication: Provides secure login and logout functionalities.
  • CRUD Operations: Enables management of user data (Create, Read, Update, Delete) using a MySQL database.
  • Session Management: Ensures users remain logged in across different pages until they log out.
  • Prepared Statements: Utilizes prepared statements for secure database queries, preventing SQL injection attacks.
  • Bootstrap Integration: Delivers a clean and responsive user interface using Bootstrap 5.

Installation

  1. Clone the Repository:

    git clone [https://github.com/younisyousaf/login_crud_php.git](https://github.com/younisyousaf/login_crud_php.git);
    
  2. Setup the Environment:

    • Install a local server like XAMPP
    • Start Apache and MySQL services.
  3. Create Database:

    • Open phpMyAdmin and create a database named "login_crud".
    • Import the provided SQL file (if available) or manually create a table named "userdata" with the following structure:
    CREATE TABLE userdata (
      email VARCHAR(50) NOT NULL,
      password VARCHAR(255) NOT NULL
    );
  4. Configure the Project:

    • Open "login.php" and "dashboard.php" files.
    • Update the database credentials (host, username, password) within these files according to your local server configuration.
  5. Access the Application:

Usage

Login: Enter your email and password to log in. CRUD Operations: Once logged in, access the dashboard to manage user data. Logout: Click the logout button to terminate the session securely.

Requirements

  • PHP 7.0 or higher
  • MySQL database
  • Apache Server (XAMPP, WAMP, etc.)
  • Bootstrap (included via CDN)

Releases

No releases published

Packages

No packages published

Languages