mmarif4u Posted February 28, 2007 Share Posted February 28, 2007 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 More sharing options...
itsmeArry Posted February 28, 2007 Share Posted February 28, 2007 get the details for the packages for the user if the package is enabled use $disabled = "disabled"; else $disabled = ""; this can be done for all the packages.. and then use <input type="button" name="btn1" value="value" <?=$disabled?> > Link to comment https://forums.phpfreaks.com/topic/40473-button-enable/#findComment-195824 Share on other sites More sharing options...
emehrkay Posted February 28, 2007 Share Posted February 28, 2007 $disabled = 'disabled = "disabled"'; Link to comment https://forums.phpfreaks.com/topic/40473-button-enable/#findComment-195826 Share on other sites More sharing options...
mmarif4u Posted February 28, 2007 Author Share Posted February 28, 2007 $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 More sharing options...
itsmeArry Posted February 28, 2007 Share Posted February 28, 2007 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 More sharing options...
mmarif4u Posted February 28, 2007 Author Share Posted February 28, 2007 Thanks itsmeArry for ur response and help, i got it. Link to comment https://forums.phpfreaks.com/topic/40473-button-enable/#findComment-195858 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.