Results 1 to 5 of 5

Thread: Disable button from another page

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Disable button from another page

    Hi guys!

    I have two pages:
    - Index.html
    - Administration.html

    Index.html contains a button, which works like a registration button and from the administration page, I want to be able to enable/disable the button on the index file.

    Any ideas?

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Disable button from another page

    So depending on the actions the user makes on index.html, you want that to determine if a button is enabled or disabled? Depending on how people get from index to administration will help you choose. You can either use URL variables or you can use form post variables. Also, you could set cookies or sessions, or even a database table to keep those settings. It all depends on how and when the user is getting from one page to the next.

    More information please.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: Disable button from another page

    First off, thank you for the reply, dclamp. This is the result of typing during night. Sorry for that!

    What I wanted to do is that with .php, an administrator should have the power to set the registrations availability on or off.

    I think I've found a way with if statements and php file_get_contents.
    I've looked around a bit and found the database table but couldn't find the basic structure for it so I had to throw that away, I'll see what my progress will be and if I solve this one then I'll post it.

  4. #4
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Disable button from another page

    For that kind of scenario your best bet would be to set up a database. You said you dont want to do that, so another alternative is to have a settings file where you can read and write to. This probably is not the most efficient however

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Disable button from another page

    If you don't want to use a database then just turn the button on and off by editing the HTML file. No need for PHP, unless there's more to it than what you've described.

Posting Permissions

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



Click Here to Expand Forum to Full Width