fix some phps

This commit is contained in:
Aloneinsky 2025-11-24 15:50:40 +07:00
parent 397b873d2a
commit b6e16acddd
6 changed files with 13 additions and 16 deletions

View File

@ -2,7 +2,7 @@
$host = "localhost";
$user = "root";
$pass = "";
$db = "mydatabase";
$db = "hitnrun";
$conn = new mysqli($host, $user, $pass, $db);

View File

@ -1,11 +1,8 @@
# Turn on rewrite engine
RewriteEngine On
# If the request is NOT a real file…
# Don't rewrite existing files or directories
RewriteCond %{REQUEST_FILENAME} !-f
# …and NOT a real folder…
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite /something → something.php
RewriteRule ^(.+)$ $1.php [L,QSA]
# Redirect everything else to index.php
RewriteRule ^(.*)$ index.php [L]

View File

@ -2,7 +2,7 @@
require "../includes/config.php";
if (!isset($_SESSION["uid"])) {
header("Location: login.php");
header("Location: signin.php");
exit;
}
?>

View File

@ -1,5 +1,5 @@
<?php
session_start();
session_destroy();
header("Location: login.php");
header("Location: signin.php");
exit;

View File

@ -44,15 +44,15 @@
<form action="" method="post">
<label>Username</label>
<input type="text" id="username" placeholder="Masukkan username" />
<input type="text" id="username" name="username" placeholder="Masukkan username" />
<label>Password</label>
<input type="password" id="password" placeholder="Masukkan password" />
<input type="password" id="password" name="password" placeholder="Masukkan password" />
<button type="submit">Sign In</button>
</form>
<div class="note">Belum punya akun? <a href="signup.html">Sign Up!</a></div>
<div class="note">Belum punya akun? <a href="signup.php">Sign Up!</a></div>
</div>
</body>
</html>

View File

@ -9,7 +9,7 @@
$stmt->bind_param("ss", $username, $password);
if ($stmt->execute()) {
echo "Account created! <a href='login.php'>Login here</a>";
echo "Account created! <a href='signin.php'>Login here</a>";
exit;
} else {
echo "Username already exists.";
@ -34,15 +34,15 @@
<form action="" method="post">
<label>Username</label>
<input type="text" placeholder="Masukkan username" />
<input type="text" id="username" name="username" placeholder="Masukkan username" />
<label>Password</label>
<input type="password" placeholder="Masukkan password" />
<input type="password" id="password" name="password" placeholder="Masukkan password" />
<button type="submit">Sign Up</button>
</form>
<div class="note">Sudah punya akun? <a href="signin.html">Sign In!</a></div>
<div class="note">Sudah punya akun? <a href="signin.php">Sign In!</a></div>
</div>
</body>
</html>