HEX
Server: LiteSpeed
System: Linux server214.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: bigisxfd (746)
PHP: 8.4.15
Disabled: NONE
Upload Files
File: /home/bigisxfd/public_html/cowork/login.php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
require_once("functions.php");

if (isset($_POST['username']) && isset($_POST['password'])) {
    $username = $_POST['username'];
    $password = $_POST['password'];

    if (login($username, $password)) {
        // Successful login
        $_SESSION['loggedin'] = true;
        header("Location: dashboard.php"); // Redirect to dashboard or wherever you want
        exit();
    } else {
        // Failed login
        // Handle error messages or display login form again
    }
}

?>
<!-- Rest of your HTML and form -->

<!DOCTYPE html>
<html>
<head>
    <title>Login</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="center-container">
    <div class="container">
            <img src="images/bigideas.jpg" alt="Logo" class="logo">
            <h2>Login</h2>
            <?php if (isset($loginError)) { echo "<p class='error'>$loginError</p>"; } ?>
            <form method="post" action="">
                <label>Username:</label>
                <input type="text" name="username" required><br>
                <label>Password:</label>
                <input type="password" name="password" required><br>
                <input type="submit" value="Login">
            </form>
        </div>
    </div>
</body>
</html>