Log in

View Full Version : Making Buttons Active After Login



tomyknoker
02-16-2007, 07:21 AM
Hi All,

I have a website which I've just been landed with, it's pretty simple HTML & CSS but members of the site can log in, this works fine no dramas... It's a MySQL DB. With the navigation there are 10 buttons these are images that are rollovers... previously 5 of the buttons were greyed out and only active after a user logged in... For some reason the previous company changed this so all buttons would be active, I want to get it back to that state so that when a user visits the site they need to login to be able to activate all the buttons... I'm only a newbie at PHP... Anyone know if this is fairly simple?

Thanks in advance!

thetestingsite
02-16-2007, 03:31 PM
In your code, there is probably some kind of "if" statement like this:



if ($loggedIn) {
//code to display the buttons

}

else {
//code to not display buttons
}


You would simply have to edit this. However, without the code posted (with all sensitive items [usernames, passwords, etc] taken out) we really can't help you out that much.

Hope this helps.

tomyknoker
02-17-2007, 04:49 AM
So do you need the code of one of the pages of the site?

thetestingsite
02-17-2007, 04:52 AM
That would be helpful.

tomyknoker
02-17-2007, 05:01 AM
Ah jeez they have given me wrong passwords! Great was hoping to take a look this weekend... Anyway, is it generally hard to do this? I know you need to see the code but just as an opinion would it take long?

thetestingsite
02-17-2007, 05:11 AM
Shouldn't take long, depending on how the code is laid out. If there are a ton of includes/requires then it could take a while to look through every file for a specific function. If it is just a few if-else statements, then it could be a few minutes to an hour (depending on how many and how good the formatting is).