hi all,
i'm trying to figure out how i can create/control account with privileges, for instance an Administrator creates an account but gives it guest privileges (able to see data but not edit, or delete it, not able to create users).
when a user logs in, i store his/her privileges is a session.
Code: $_SESSION['staff_privilege'] = $found_user['privilege'];
i wrote this function to check for privileges and placed it in the create user page. (1 = admin, 2 = guest)
Code: function get_privilege() {
if (logged_in() && isset($_SESSION['staff_privilege'])) {
if ($_SESSION['staff_privilege'] == 2) {
redirect_to("../staff/staff_browse.php?privilege=false");
}
} else {
redirect_to("../staff/index.php");
}
}
for instance if a user with guest privileges goes to create user page, he/she will get redirect to another page showing a message.
the above code is working, but i'm wanted other ideas about how this could be accomplished in another way
thanks
Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jpg"/> it will send this &lt;img src="image.jpg"&gt;
form variables from database help.
Hi all,I would like to have a form that gives you options based on the results of an mysql query.My example is this, say I have a mysql row with the colum name points and the result is 5. How would I
Serial number of exernal hard disk/Thumbdrive
Hi guys,
Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can anyone help me?here are the codesRegisterCode: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
Help With editting and deleting form
Hallo !!So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this
Linked Keywords
I am trying to get a script that makes my predefined keyword converted to links and / or converted to a certain color, size and so on... In one of the other threads Ive posted I got an answer I am a
exclude characters from counting?
Hello, I wanted to ask if you have a string like:Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR....';is there a way to count the length of the string, excluding non-word characters (+,- or .)?thank you
Checking if a process is running (problems including psapi.dll i think...)
Ok, so all I'm trying to do is check if a program is running...
Mastering Regular Expressions, Third Edition, is available.
The Third Edition of Mastering Regular Expressions is available.QuoteThis third edition is 58 pages longer than the second edition, and now reaches 542 pages in length. The main changes from the
j1inmis Ouput layout changes
Hi,