0% found this document useful (0 votes)
3 views5 pages

User Registration and Login System

The document outlines a simple web application structure including a navigation bar with links to home, library, about, login, and register pages. It features a registration form that captures username, email, and password, and inserts this data into a MySQL database. Additionally, it mentions a database named 'Bebas' with a single table for user information.

Uploaded by

bbeen8543
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

User Registration and Login System

The document outlines a simple web application structure including a navigation bar with links to home, library, about, login, and register pages. It features a registration form that captures username, email, and password, and inserts this data into a MySQL database. Additionally, it mentions a database named 'Bebas' with a single table for user information.

Uploaded by

bbeen8543
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Beranda

<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="[Link]
</head>
<body>
<nav class="p-5 shadow-md flex">
<ul class="flex gap-5 p-5">
<li><a href="">home</a></li>
<li><a href="">library</a></li>
<li><a href="">about</a></li>
<li><a href="[Link]">login</a></li>
<li><a href="[Link]">register</a></li>
</ul>
</nav>
</body>
</html>
REGISTER
<?php
$koneksi = mysqli_connect("localhost","root","","terserah");

if(isset($_POST['register'])){
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['password'];
$query = mysqli_query($koneksi,"INSERT INTO
user(username,email,password)
values ('$username','$email','$password')");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Document</title>
<script
src="[Link]
</head>
<body>
<form action="[Link]" method="post">
<label for="">username</label>
<input type="text" name="username" class="border">
<label for="">email</label>
<input type="email" name="email" class="border">
<label for="">password</label>
<input type="password" name="password" class="border">
<button type="submit" name="register">register</button>
</form>
</body>
</html>
Login
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-
width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Halaman Login</h1>
</body>
</html>
Database & Tabel
Nama Database: Bebas(“Saran pakai nama atau
projek_ukk”)
Tabel: Baru satu cuman tabel user aja

Gambar scema tabelnya

You might also like