Auto commit: 2026-01-04T09:33:30.759Z
This commit is contained in:
parent
45c3a6c25b
commit
efcbe8235d
@ -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
3
session_config.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
session_start();
|
||||
?>
|
||||
Loading…
x
Reference in New Issue
Block a user