Using a SQL database is the only way you're going to have data that keeps on the server, and can be viewed by other users. AS you already know MySQL is popular but if you don't have any database available, SQL Lite is a good choice is it doesn't require you to install anything on the server, just have SQL Lite enabled in the PHP confic.
Create a 'users' table in your database, store the password as a SHA-256 hashed value (not raw, not MD5). When they login make use of PHP sessions via session_start() and upon a successful login make sure to use session_regenerate_id() too (it prevents a known exploit for stealing logins).
PHP sessions are considered a simple and secure way to implement logins, trying to re-invent the wheel manually with your own cookies will lead to security problems and more work for you.