Jump to content

Mirabelle

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Mirabelle's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Perhaps I am not approaching this the best way but I'll explain what I am trying to do: I wanted to create a field in the "users" table for each link that is going to be restricted. Here is my table structure that I was going to use: create table users ( uid int not null primary key auto_increment, username char(16) not null, password char(16) not null, post tinyint not null default '1', reply tinyint not null default '1, edit tinyint not null default '0', delete tinyint not null default '0' ); If the value is set to 1, the link would be displayed for the user.  If the value is set to 0, the link would not be displayed. This way, instead of making usergroups which manage the permissions, I can just edit the user directly. I am using sessions by the way.  Feel free to let me know if I shouldn't be doing it this way.  Again, this is my first PHP/MySQL project.
  2. Forgive me as I am a ColdFusion person trying to learn PHP. I have created a login script.  Anyone can login to see the page, however, I want to only display certain links if the user has permission to view them. In the MySQL database, I have a field called "link" just for testing purposes.  It has a "1" for permission and a "0" for no permission. In Coldfusion, one line of code does this for me but I don't think I can convert it to work with the PHP language. Any help would be appreciated.  Thank you!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.