grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026prepare($sql); $stmt->execute([$username, md5($password)]); $user = $stmt->fetch(); if($user){ $_SESSION['user_id'] = $user['id']; header('Location: index.php'); exit(); } else { $error = "نام کاربری یا رمز عبور اشتباه است"; } } ?>