How to disable HTML buttons

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

How to disable HTML buttons

Post by impulse() »

I want to create a form that searches a DB for an entry and if that entry is equal to 0 it leave the button clickable but otherwise it greys the button out.
I know the PHP side of this but how do you create a HTML button that's unclickable and greyed out?

Regards,
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I believe it's like this:

Code: Select all

<input type="submit" value="Submitting..." disabled="disabled">
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

Kudos for you.
Post Reply