<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

@session_start();
// Check if user is logged in
if (!isset($_SESSION['userid'])) {
    header("Location: index.php");
    exit();
}
require_once ("../_db.php");

// Using $conn for MySQLi queries
$userid = $_SESSION['userid'];
$sql = $conn->query("SELECT * FROM admin_login WHERE userid ='$userid' ");

if($sql->num_rows > 0){
    $row = $sql->fetch_assoc();
}

// Using $conn for MySQLi queries
$pdoStatement = $conn->query("SELECT * FROM admin_login WHERE userid ='$userid' ");
if($pdoStatement->num_rows > 0){
    $pdoRow = $pdoStatement->fetch_assoc();
}
?>

