Jump to content

Button enable


mmarif4u

Recommended Posts

Hi guys,

 

I have some packages on my site for users.

When user enter through userid and password to the site,

there are 4 buttons which describe the packages.

i want that for a specific package some buttons disabled,some enabled.

For example package A when user enter to site 3 buttons will be disabled and only

1 enable.

The package type is registered by our admin for that user.

code like this:

if package A (disabled buttonname,buttonname);

 

Not necessary that just like this but some thing like this.

 

Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/40473-button-enable/
Share on other sites

$disabled = 'disabled = "disabled"';

 

<input type="button" name="btn1" value="value" <?=$disabled?> >

 

I cant understand this: value="value" <?=$disabled?>

 

where to put this:

$disabled = 'disabled = "disabled"';

 

Can u more clear to show the complete code.

Link to comment
https://forums.phpfreaks.com/topic/40473-button-enable/#findComment-195833
Share on other sites

if the package is enabled use

    $disabled = 'disabled = "disabled"';

else

    $disabled = "";

 

 

if the package is enabled use

    $disabled2 = 'disabled = "disabled"';

else

    $disabled2 = "";

 

 

 

for btn1

<input type="button" name="btn1" value="value1" <?php echo $disabled?> >

for btn2

<input type="button" name="btn2" value="value2" <?php echo $disabled2?> >

 

and so on for other buttons

 

you need to place it where you have the code for button which have to be disabled.

Link to comment
https://forums.phpfreaks.com/topic/40473-button-enable/#findComment-195857
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.