hello boardies

once again i need your help!

on my website i want to provide a member sektion (no xxxx site).
i want to have the authentication done with htaccess. but, the thing is, i'll have individual accounts for the users, such as tryout-accounts (wich expire after some time), or vip-accounts wich have more rights than normal users and so on and so on…

so, (according to my knowledge), in case if you have individual user accounts there must be something like a pre-authentication bevore the htaccess authentication.


now i'm not sure if i should solve thist pre-authentication with php or cgi. i plane to have a mysql database for the user datas and i'll also use a robot(something like a small googlebot) wich is made with cgi. the robot should take the information wich he needs from the mysql-database and at the end of the scann he should save his relult of the scann back to the mysql-database.

my stupide questions

-can cgi work(get datas and save datas), with a mysql-database?

-can cgi and php work together (use the same mysql-database to get datas, and save back datas)
i mean, can cgi work (save and get datas), with a mysql-database when there is also php in use wich is using this mysql-database.


my less stupide questions(hope so)

-what is better (more secure), for the described pre-authentication, cgi or php?

-does anyone know where i can find a script for this task, doesn't matter if it is shareware!

if there is a somebody who can help me, he can be sure that I will send him a link of my website when it ist done. And perhaps i will give him a free account for half a year or something like this(but, as i sad, no xxxx site:-)))


best wishes bluechip