fix some phps
This commit is contained in:
parent
397b873d2a
commit
b6e16acddd
@ -2,7 +2,7 @@
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "mydatabase";
|
||||
$db = "hitnrun";
|
||||
|
||||
$conn = new mysqli($host, $user, $pass, $db);
|
||||
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
require "../includes/config.php";
|
||||
|
||||
if (!isset($_SESSION["uid"])) {
|
||||
header("Location: login.php");
|
||||
header("Location: signin.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
header("Location: login.php");
|
||||
header("Location: signin.php");
|
||||
exit;
|
||||
|
||||
@ -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>
|
||||
@ -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>
|
||||
Loading…
x
Reference in New Issue
Block a user