JQuery/PHP - Only showing a button for Administrator account
<p>I have a web site which allows users to logon to a control panel that allows users to change content of the web site.</p>

<p>When creating the users you can set the account type: (PHP)</p>

<p>i.e. <code>UserAccount::get_accounttype() == 1</code> full access</p>

<p>and <code>UserAccount::get_accounttype() == 0</code> part access</p>

<p>I have stopped access to certain pages by using a redirect as follows:</p>

<pre><code>if (UserAccount::get_accounttype() == 0 {
    header("Locaction: webpage.php");
}
</code></pre>

<p>However on certain pages I am wanting to hide certain buttons so that users with <code>UserAccount::get_accounttype() == 0</code> can't use or see them.</p>

<p>I am just wondering what the best way to achieve this would be?</p>

<p>I know I can hide buttons in jQuery using <code>$('target').hide();</code> but how would I do this from a PHP function?</p>
