Greg_11 0 Newbie Poster

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.