is it possible to disable a button through php script?

what exactly do you mean?e.g disable a button based on condition,etc.

<?php
$x=1;
if($x==1) { $disabled="disabled=true"; } else { $disabled="disabled=false"; }
echo "<Input type='button' name='button' value='button' $disabled >";
?>

:) Like this ?

i have a page in php in which user has to fill in details.This details are carried on to the next page through POST. suppose there ia a option called "Country" which has its values as India, America etc the user has to select from these options. the "Country" select button is followed by "Centre" which has options like None,1,2 etc. now when user selects "India" as "Country" then the "Centre" button will gray out(disable). Also if the user selects some other country then the "Centre" button will become enabled with all its options.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.