This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Database configuration | |
$servername = "localhost"; | |
$username = "root"; | |
$password = ""; | |
$dbname = "boiyetsdb"; | |
// Create connection | |
$conn = new mysqli($servername, $username, $password, $dbname); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['username']) || $_SESSION['role'] != 'client') { | |
header("Location: login.php"); | |
exit(); | |
} | |
$servername = "localhost"; | |
$username = "root"; | |
$password = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['username']) || $_SESSION['role'] != 'client') { | |
header("Location: login.php"); | |
exit(); | |
} | |
$servername = "localhost"; | |
$username = "root"; | |
$password = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['username']) || $_SESSION['role'] != 'client') { | |
header("Location: login.php"); | |
exit(); | |
} | |
$servername = "localhost"; | |
$username = "root"; | |
$password = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
session_unset(); | |
session_destroy(); | |
header("Location: login.php"); | |
exit(); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// Database connection | |
$servername = "localhost"; | |
$username = "root"; | |
$password = ""; | |
$dbname = "boiyetsdb"; | |
// Create connection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header('Content-Type: application/json'); | |
echo json_encode(['success' => false, 'message' => 'Unauthorized access']); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// Database connection | |
$servername = "localhost"; | |
$username = "root"; | |
$password = ""; | |
$dbname = "boiyetsdb"; | |
// Create connection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; | |
$username = "root"; |