This project demonstrates basic CRUD (Create, Read, Update, Delete) operations in a simple website and applications with security management in session.
This application provides a basic structure to perform CRUD operations for managing data.
-
Create: Add new data
-
Read: View data
-
Update: Modify existing data
-
Delete: Remove data
And using session protocol to protect the connections
Make sure you have the following here:
- Program Languages (e.g, PHP, mySQL)
- Code Editor (e.g, Visual Studio Code, Sublime Text)
- Web Server (e.g, XAMPP)
- Web Browser (e.g, Google Chrome, Firefox, Edge)
- Database (default: phpMyAdmins)
Follow the following command in here:
- Open your XAMPP (suggest: Run in Administrator)
-
Start the
ApacheandMySQLoptions -
In
MySQLoption, click theAdminto access phpMyAdmins pages
-
Browse
DatabaseandCreate Database -
Create Table
loginandprofil
-- Table Login
CREATE TABLE 'login' (
'id' INT(11) NOT NULL, --primary key --auto_increment
'username' VARCHAR(50) NOT NULL,
'password' VARCHAR(100) NOT NULL
)-- Table profil
CREATE TABLE 'profil' (
'id' INT(11) NOT NULL, -- primary key --auto _increment
'nama' VARCHAR(100) NOT NULL,
'email' VARCHAR(100) NOT NULL,
'nomor' VARCHAR(20) NOT NULL,
'asal' VARCHAR(50) NOT NULL
)- Insert Table
loginwith admin user
INSERT INTO 'login' ('id', 'username', 'password')
VALUES ('1', '{your_username}', '{your_password}')- opsional to insert table
profile:
INSERT INTO 'profil' ('id', 'nama', 'email', 'nomor', 'asal')
VALUES ('1', '{yourname}', '{your_email}', '{nomor}', '{asal}')-
Download ZIP this repo. and extract into
C://xampp/htdoc/{paste_here}. you can speciality to edit files from your Code Editor. -
I mentions in
db.phpyou might need to update.
<?php
// if you have hostname, username, password.
// you can change that to your code here
$hostname = "localhost";
$username = "root";
$password = "";
$dbname = "{yourDatabaseName}";
$conn = new mysqli($hostname, $username, $password, $dbname);
// Check the error
if ($conn->connect_error){
die("Connection error: ". $conn->connect_error);
}- Congrats and enjoy. keep learning!!
To run this project, Open your web browser and type: localhost/{your_path_directory}
- Login Pages
login.php
- Create
tambah.php
- Read
index.php
- Update
edit.php
- Delete
hapus.php






