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
Product categories for registration
Dear all,
writing a screen scraper
Hello,I'm writing a screen scraper application and want to be able to get absolute addresses for images from relative links.So a link like this: Code: <img
limit string by words??
hello all,I was wonder if there is a function to limit a string by the number of words instead of characters?
how to insert value
I am having file bookissueadd.php..... in which i am having tag <td height="21">Issue Charges</td> <td><div
please help
HTML Code:Code: <span id="ctl00"><span> <div class="ldpPropFeatures"> <div
EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules the European Commission want to implement from 2010?
Php script to read msword file
hi,I need to read a msword file and i want to print the contents in that word file.i used the fgets() and its working for text file. but its not working for word file.Help me in this.Thanks
Header redirect
Hello ive got a problem ive got form with its action set to itself.Code: <form id="formID" class="formular" method="post" action=""/>it then runs
Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand, so, if I may, I'd like to ask quite a specific question.I'm creating a contact form, and I need to
mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily MySQL, we used the Microsoft variety in school). I have a weird problem, I'm trying to create a