Transfer to git
This commit is contained in:
23
includes/chat_reading.inc.php
Normal file
23
includes/chat_reading.inc.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "GET") {
|
||||
try {
|
||||
require_once "dbh.inc.php";
|
||||
require_once "chat_reading_model.inc.php";
|
||||
require_once "chat_reading_view.inc.php";
|
||||
require_once "chat_reading_contr.inc.php";
|
||||
|
||||
$chat_history = get_chat_history($pdo);
|
||||
|
||||
display_history($chat_history);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
echo "An error has ocurred: " . $e->getMessage();
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
echo "Wrong request type, please check your request.";
|
||||
exit();
|
||||
}
|
||||
Reference in New Issue
Block a user