Click to See Complete Forum and Search --> : mysql auth


toenailsin
02-19-2008, 09:40 PM
hi, i have a simple mysql auth for certain parts of my site and i was wondering if i can make it so that only allow certain users can get in. i'm wanting to use an existing database with users in it but only allow ppl with a rank of admin in. i've visited many sites looking for this, but to no avail.

this is what i have so far:

<IfModule mysql_auth_module>
<Location /restricted>
AuthMySQLEnable On
AuthName "Restricted Area"
AuthType Basic
require valid-user
AuthMySQLHost localhost
AuthMySQLUser *
AuthMySQLPassword *
AuthMySQLDB *
AuthMySQLUserTable users
AuthMySQLNameField username
AuthMySQLPasswordField password
AuthMySQLPwEncryption sha1
</Location>
</IfModule>

chazzy
02-20-2008, 05:47 AM
what version of mysql? unfortunately, this module doesn't provide any syntax like that. you could use a view to only show admins.