check for ur access level then execute the sql statemtn like this
$sql="insert into userdata values('$username','$page_name','$timestamp')";
so your table userdata should have these three filelds.
You can che at what time did the user used which page.. OK?
then connect to mysql
$result=mysql_query($sql) or die (mysql_error()); //mysql_error() will give you the error from mysql if any erroe occcurs
I think you got the idea how to insrt the information to the table
If thisis not youwant then little more explaination is required in this regard