musicradiolive Posted March 5, 2007 Share Posted March 5, 2007 How can i make it so content is only shown if the user has a set level.I have table called tblUsers. In there is a field called UType.Theres: Admin & Staff.I only want the content to be shown if the logged in user is Admin. <%IF UTYPE IS ADMIN THEN THIS CONTENT WILL SHOW.....%> <tr bgcolor="#000000" class="topmenu"> <td height="30"><a href="#">Home</a></td> <td height="30"><a href="#">Features</a></td> <td height="30"><a href="#">Services</a></td> <td height="30"><a href="#">Reviews</a></td> <td height="30"><a href="#">Articles</a></td> <td height="30"><a href="#">Contact Us</a></td> <td height="30"><a href="#">Links</a></td> </tr><% CLOSE THE ADMIN SECTIN HERE AND CARRY ON SHOWING THE REST OF THE PAGE CONTENT.... %> Thanks in advance for help. Link to comment Share on other sites More sharing options...
justsomeguy Posted March 5, 2007 Share Posted March 5, 2007 When the user logs in, store the type wherever you are storing the login name. If it's in the session, add the type to the session. Link to comment Share on other sites More sharing options...
musicradiolive Posted March 5, 2007 Author Share Posted March 5, 2007 worked a treat, thanks for pointing me in right direction.much appreciatedJon Link to comment Share on other sites More sharing options...
rubyknight Posted March 6, 2007 Share Posted March 6, 2007 Hello all.Sometimes I create a separate VIEW (in SQL) or PROCEDURE (in SQL) to avoid web-users from accessing the tables directly. Hope this helps... or am I making it worse? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now