<?php
require_once("models/res_roles.class.php");

$result = "";
if (isset($_POST['name'])) {
    $name = $_POST['name'];
    $role = new ResRoles(null, $name);
    $result = $role->create();
    
}
?>

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Role Manager</title>
</head>

<body>
    <div class="card-body">

        <form method="post">
            <div class="card-body">
                <div class="form-group">
                    <label for="name">Name</label>
                    <input type="text" class="form-control" name="name" placeholder="Enter Role Name" style="outline: 1px solid #d16f6fff;">
                </div>
            </div>
            <div class="card-footer">
                <button type="submit" class="btn btn-outline-primary">Submit</button>
            </div>
            <h3 class="text-info"><?php echo $result; ?></h3>

        </form>


    </div>


    </form>
</body>

</html>