%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64
User : ndkhermy ( 1200)
PHP Version : 8.5.12
Disable Function : NONE
Directory :  /home1/ndkhermy/public_html/website_6ca89795/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home1/ndkhermy/public_html/website_6ca89795/logindata.php
<?php
include('dbcon.php');
if (isset($_POST['login'])) {
    $loginInput = $_POST['uname'];
    $password = $_POST['pass'];
    $stmt = $conn->prepare("SELECT * FROM user WHERE (username = ? OR email = ?) AND password = ?");
    $stmt->bind_param("sss", $loginInput, $loginInput, $password);
    $stmt->execute();
    $result = $stmt->get_result();
    if ($result->num_rows > 0) {
        $row = $result->fetch_assoc();
        if ($row["usertype"] == "") { 
            session_start();
            $_SESSION["username"] = $row['username'];
            $_SESSION["id"] = $row['id']; 
            echo "<script>window.location.href = 'user/dashboard.php';</script>";
        } else {
            echo "<script>alert('Username or password not match!!'); window.location.href = 'login.php';</script>";
        }
    } else {
        echo "<script>alert('Username or password not match!!'); window.location.href = 'login.php';</script>";
    }
    $stmt->close();
    $conn->close();
}
?>

VaKeR 2022