<?php
if(mysql_num_rows($result5)>0)
{
echo 'condition matched';
// the above echo is just for testing
?>
<script type='text/javascript'>
document.getElementById("submitbtn").style.display = "none";
</script>
<?php
}
?>
here I am evaluating an if clause, if the condition is true, I want to hide the submit button of the form.
<form action='xyz.php'>
<input type='text'>
<input type='text'>
<input type='text'>
<input type='submit' id='submitbtn' name='save' value='SAVE' class='form_btn'>
</form>
The condition is evaluating to true, but the submit button is still visible. How do I achieve this??