Auto commit: 2026-01-04T09:33:30.759Z

This commit is contained in:
Flatlogic Bot 2026-01-04 09:33:30 +00:00
parent 45c3a6c25b
commit efcbe8235d
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,5 @@
<?php
// Start session at the very beginning
session_start();
require_once __DIR__ . '/../session_config.php';
// Set headers
header('Content-Type: application/json');
@ -20,6 +19,8 @@ if (!$input || !isset($input['email']) || !isset($input['password'])) {
$email = trim($input['email']);
$password = $input['password'];
$pdo = db();
try {
// Query user from database
$stmt = $pdo->prepare("SELECT * FROM users WHERE email = ? LIMIT 1");

3
session_config.php Normal file
View File

@ -0,0 +1,3 @@
<?php
session_start();
?>