What I want is something like that :
If not admin then hide some button. But if I do
if ($Admin == null)
{
echo "You are not admin"; //That works
//So we hide the button id="New"
?>
<script type = "text/javascript">
document.getElementById('New').style.visibility = "hidden";
</script>
<?php } ?>
But nothing happens. It says "You are not admin" but the button isn't hidden
I know how to hide fields by clicking buttons or checking checkbox with functions but i don't know how how to do by using a "if". Thanks for reading