write a login function
You will get something generic, in a framework you may not use, with assumptions you cannot see.
PHP 8.3, plain PDO, no framework. MySQL users table with columns id, email, password_hash, is_active. Write a login function that: - takes email and password - uses a prepared statement - verifies with password_verify - returns the same error message whether the email or the password was wrong - does not leak whether an email is registered Return only the function.
The full message and the surrounding code beats describing it. "It doesn't work" gets you a guess.
"That uses a function removed in PHP 8; rewrite without it" is faster than a fresh prompt, because the context is already there.
"Explain the trade-offs before writing code" often produces a better answer, and lets you catch a wrong assumption before it is buried in fifty lines.