in reply to Using CGI to collect and store user data

You need to check if .htaccess files are supported first - then you can use AuthType Basic (HTTP spec) and htpasswd so store username/password combos in a file... the server can handle authentication.

To do anything more sophisticated you probably need a database as well (but you didn't mention that)...