← Back Home
Login page
Posted by: jay67
PHP

1780328423_login.php



<?php
session_start();

?>

<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Login | TenaCode</title>

<link href="https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">

<style>

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{
    --bg:#05060f;
    --card:#10131f;
    --card-2:#151929;
    --border:rgba(255,255,255,0.08);
    --text:#ffffff;
    --muted:#9ea3b5;
    --accent:#7c5cff;
    --accent-2:#00d4ff;
    --danger:#ff5f7a;
}

body{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    background:
        radial-gradient(circle at top left, rgba(124,92,255,0.25), transparent 35%),
        radial-gradient(circle at bottom right, rgba(0,212,255,0.18), transparent 35%),
        var(--bg);
    font-family:'Inter',sans-serif;
    color:var(--text);
    position:relative;
}

/* GLOW */
body::before{
    content:'';
    position:absolute;
    width:700px;
    height:700px;
    background:radial-gradient(circle, rgba(124,92,255,0.18), transparent 70%);
    top:-250px;
    left:-200px;
    filter:blur(20px);
}

body::after{
    content:'';
    position:absolute;
    width:600px;
    height:600px;
    background:radial-gradient(circle, rgba(0,212,255,0.12), transparent 70%);
    bottom:-250px;
    right:-180px;
    filter:blur(20px);
}

.login-container{
    position:relative;
    z-index:10;
    width:100%;
    max-width:440px;
    padding:24px;
}

.login-card{
    background:rgba(16,19,31,0.75);
    backdrop-filter:blur(24px);
    border:1px solid var(--border);
    border-radius:32px;
    padding:42px;
    box-shadow:
        0 10px 40px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.04);
    animation:fadeUp .8s ease;
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(25px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

.logo{
    width:78px;
    height:78px;
    margin:0 auto 24px;
    border-radius:24px;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:32px;
    box-shadow:
        0 10px 35px rgba(124,92,255,0.4);
}

.title{
    font-family:'Syne',sans-serif;
    font-size:38px;
    font-weight:800;
    text-align:center;
    margin-bottom:8px;
    letter-spacing:-1px;
}

.subtitle{
    text-align:center;
    color:var(--muted);
    font-size:15px;
    margin-bottom:34px;
    line-height:1.5;
}

.error{
    background:rgba(255,95,122,0.08);
    border:1px solid rgba(255,95,122,0.25);
    color:var(--danger);
    padding:14px;
    border-radius:14px;
    font-size:14px;
    margin-bottom:18px;
}

.form-group{
    margin-bottom:18px;
}

.label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:600;
    color:#d8d9e2;
}

.input-box{
    position:relative;
}

.input-box input{
    width:100%;
    padding:16px 18px;
    padding-right:55px;
    border:none;
    outline:none;
    border-radius:18px;
    background:var(--card-2);
    border:1px solid transparent;
    color:var(--text);
    font-size:15px;
    transition:0.25s ease;
}

.input-box input:focus{
    border-color:rgba(124,92,255,0.8);
    box-shadow:
        0 0 0 4px rgba(124,92,255,0.15);
}

.input-box input::placeholder{
    color:#7d8498;
}

.toggle-password{
    position:absolute;
    right:18px;
    top:50%;
    transform:translateY(-50%);
    cursor:pointer;
    font-size:18px;
    color:#8d93a8;
    transition:0.2s;
}

.toggle-password:hover{
    color:white;
}

.options{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:4px;
    margin-bottom:26px;
}

.remember{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    color:var(--muted);
}

.remember input{
    accent-color:var(--accent);
}

.forgot{
    color:var(--accent-2);
    text-decoration:none;
    font-size:14px;
    font-weight:600;
}

.forgot:hover{
    text-decoration:underline;
}

.login-btn{
    width:100%;
    border:none;
    cursor:pointer;
    padding:16px;
    border-radius:18px;
    font-size:16px;
    font-weight:700;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    color:white;
    transition:0.25s ease;
    box-shadow:0 10px 25px rgba(124,92,255,0.35);
}

.login-btn:hover{
    transform:translateY(-2px) scale(1.01);
    box-shadow:0 14px 35px rgba(124,92,255,0.45);
}

.bottom-text{
    margin-top:28px;
    text-align:center;
    font-size:14px;
    color:var(--muted);
}

.bottom-text a{
    color:white;
    text-decoration:none;
    font-weight:700;
}

.bottom-text a:hover{
    color:var(--accent-2);
}

/* MOBILE */
@media(max-width:600px){

    .login-container{
        padding:18px;
    }

    .login-card{
        padding:30px 24px;
        border-radius:26px;
    }

    .title{
        font-size:32px;
    }

    .subtitle{
        font-size:15px;
    }

    .input-box input{
        padding:18px;
        font-size:16px;
    }

    .login-btn{
        padding:18px;
        font-size:17px;
    }

}

</style>
</head>

<body>

<div class="login-container">

    <div class="login-card">

        <div class="logo"></div>

        <h1 class="title">Welcome</h1>

        <p class="subtitle">
            Welcome back. Sign in to continue building amazing things.
        </p>

        <?php if(!empty($error)){ ?>
            <div class="error">
                ⚠ <?php echo $error; ?>
            </div>
        <?php } ?>

        <form method="POST">

            <div class="form-group">

                <label class="label">Email Address</label>

                <div class="input-box">
                    <input 
                        type="email" 
                        name="email" 
                        placeholder="Enter your email"
                        required
                    >
                </div>

            </div>

            <div class="form-group">

                <label class="label">Password</label>

                <div class="input-box">

                    <input 
                        type="password"
                        name="password"
                        id="password"
                        placeholder="Enter your password"
                        required
                    >

                    <span class="toggle-password" onclick="togglePassword()">
                        👁️
                    </span>

                </div>

            </div>

            <div class="options">

                <label class="remember">
                    <input type="checkbox">
                    Remember me
                </label>

                <a href="forgot-password.php" class="forgot">
                    Forgot Password?
                </a>

            </div>

            <button type="submit" name="login" class="login-btn">
                Sign In
            </button>

        </form>

        <div class="bottom-text">
            Don't have an account?
            <a href="register.php">Create Account</a>
        </div>

    </div>

</div>

<script>

function togglePassword(){

    const password = document.getElementById("password");

    if(password.type === "password"){
        password.type = "text";
    }else{
        password.type = "password";
    }

}

</script>

</body>
</html>

Preview

Comments