Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

26 changes: 26 additions & 0 deletions api_config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
header("Access-Control-Allow-Headers: Content-Type, Authorization");
header("Content-Type: application/json");

if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
http_response_code(200);
exit();
}

$connect = new mysqli("localhost", "root", "", "security");
if ($connect->connect_error) {
http_response_code(500);
echo json_encode(["success" => false, "message" => "DB connection failed: " . $connect->connect_error]);
exit();
}

include 'mailer.php';

if (session_status() === PHP_SESSION_NONE) {
session_start();
}

error_reporting(E_ALL);
ini_set('display_errors', 1);
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"symfony/mailer": "^7.3"
}
}
Loading