Results 1 to 6 of 6

Thread: Making Buttons Active After Login

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Making Buttons Active After Login

    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!

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    In your code, there is probably some kind of "if" statement like this:

    Code:
    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.

  3. #3
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So do you need the code of one of the pages of the site?

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    That would be helpful.

  5. #5
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    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).
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •