Enable roles/permissions with php?

I'm looking for a way when someone is logged in that if they visit a page a script runs changing their account permission. Can that be done and how?
Tagged:
0
I'm looking for a way when someone is logged in that if they visit a page a script runs changing their account permission. Can that be done and how?