Greg_11 0 Newbie Poster Premium Member

I am trying to hide a radio button based on wether or not a user is an admin

     if (($_SESSION['admin']) == 0) ?> 
    <script>document.getElementById('adminbutton').style.display = 'none' </script>
 if (($_SESSION['admin']) == 1) ?> 
    <script>document.getElementById('adminbutton').style.display = 'block' </script>

Obviously the above doesn't work.. Any help is, as usual, greatly appreciated.

Be a part of the DaniWeb community

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