Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    26

    Unanswered: Showing links based on permission

    I only want users to see links based on if they have permission or not. This links would be Post, Reply, Edit and Delete. I know the current table structure does not provide much for expansion and I will work on that later but I need to pass this hurdle first. Thanks for your help!

    Code:
    CREATE TABLE `users` (
      `id` int(5) NOT NULL auto_increment,
      `username` varchar(20) NOT NULL default '',
      `password` varchar(20) NOT NULL default '',
      `post` enum('N','Y') NOT NULL default 'N',
      `reply` enum('N','Y') NOT NULL default 'N',
      `edit` enum('N','Y') NOT NULL default 'N',
      `delete` enum('N','Y') NOT NULL default 'N',
      PRIMARY KEY  (`id`),
    ) TYPE=MyISAM AUTO_INCREMENT=1 ;

  2. #2
    Join Date
    Jul 2004
    Location
    Dundee, Scotland
    Posts
    107
    the table structure seems okay. you could use a role based system instead but either way you'll be able to do it. I assume you'll hold the user's id and permissions in session variables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •