|
-
May 14th, 2011, 09:42 PM
#1
Thread Starter
Lively Member
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?
-
May 15th, 2011, 01:18 AM
#2
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.
-
May 15th, 2011, 01:44 PM
#3
Thread Starter
Lively Member
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.
-
May 15th, 2011, 04:27 PM
#4
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
-
May 16th, 2011, 05:14 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|