banco_projeto/setup.php
2021-09-02 08:27:03 -03:00

18 lines
412 B
PHP

<?php
if(session_status() !== PHP_SESSION_ACTIVE){
session_start();
}
include('conexao_publica.php');
$sql = "SELECT tipo_usuario FROM consulta_usuarios WHERE tipo_usuario = 'adm'";
$stmt = $con->prepare($sql);
if($stmt->execute())
{
$row = $stmt->get_result()->fetch_assoc();
if(!is_array($row))
{
$_SESSION['setup'] = true;
header('Location: setup/index.php');
}
}
?>