hi i really dont know a lot about javascript so sorry for this amatuer question. im trying to make a quiz page using php with 2 sets of questions. i want to disable the 2nd button for the other quiz and only be enabled when the user passed the first one.
this is what i wanted to happen:
<?php
require 'config.php';
$name = "kevin";
$result =mysql_query("select score from members where Username = '$name' " );
?>
<input name="button1" type="button" value="1" />
<input name="button2" type="button" value="2" disabled="disabled" />
<script type="text/javascript">
if<?php $score is greater than 5 ?>{
$('#button2').removeAttr('disabled');
}
else {
$('#button2').attr("disabled","disabled");
}
});
</script>
any help will be much appreciated, thanks in advance.
$(document).readydeclaration.