View Full Version : How do I hide the admin button in a registration page once the administrator has registered?

11-03-2009, 07:43 PM
Hi everyone, I am creating my first PHP web site so forgive my ignorance.

I'm using Dreamweaver CS3, and I have created a registration page using the record insertion form wizard.

At the bottom of the form I have two radio buttons one button has the value yes and the other button has the value no. These two radio buttons represent admin privaleges.

After the administrator has finished filling in their details and clicks the yes button for admin,
can I use PHP to hide the admin yes button so that no one else can log in as an administrator ?
If so how do I do that?


11-03-2009, 11:33 PM
yes but it sounds flawed
the registration is for a membership? if so i doubt you want any 1 to automatically register as admin. it would be better to set an admin using levels, you can do this with thedw wizard, then on an admin only page using an update form you as admin could update anty member to admin if you chose to.
im guessing here, obviously, to your intentions so correct me if ive got it wrong

11-05-2009, 08:48 AM
I agree with edbr, its pretty simple to setup a user level.

In your DB you just need to add a field called Level in your PHP you have a session control and also some code to identify the level.

i.e A = Administrator you then can give access to more pages functionality etc..
S = Superuser scaled down option
U = Standard user.

I think Domedia gave me the code many years ago. I will dig it out tonight and post a reply here with it.