Coding Part 1 Pta
Coding Part 1 Pta
DOCTYPE html>
<html lang="en">
<head>
<body>
<meta charset="UTF-8">
<meta http-equiv="x-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>KEHADIRAN DEWAN PERDANA</title>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/
Dwwykc2MPK8M2HN" crossorigin="anonymous">
</body>
</head>
<?php
$hostName = "localhost";
$dbUser = "root";
$dbPassword = "";
$dbName = "dewanperdana";
$conn = mysqli_connect($hostName, $dbUser, $dbPassword, $dbName);
if (!$conn) {
die("Something went wrong;");
}
// Create connection
$connection = new mysqli($hostName, $dbUser, $dbPassword, $dbName);
if (!$result){
$errorMessage = "Invalid query;" . $connection->error;
break;
}
?>
<style>
body{
background-image:
url('https://img.freepik.com/free-vector/watercolor-paper-with-floral-
design_53876-97360.jpg?
size=626&ext=jpg&ga=GA1.1.1803636316.1700611200&semt=ais');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
height: 100vh;
margin: 0vh;
display: flex;
justify-content: center;
align-items: center;
}
</style>
<head>
<body>
<h1 style="text-align: center; font-size: 50px;">KEHADIRAN DEWAN
PERDANA</h1>
<form id="LoginForm">
<p style="text-align: center; font-size: 20px;">
<label for="username">USERNAME</label>
<input type="text" id="username" name="username" required>
</p>
</form>
</body>
</head>
<script>
function attemptLogin() {
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
window.location.href="home.php";
console.log("USERNAME" + username);
console.log("PASSWORD" + password);
</script>
</html>