Click here to Skip to main content
15,503,579 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: destroy session after sometime Pin
Kornfeld Eliyahu Peter4-May-14 23:08
professionalKornfeld Eliyahu Peter4-May-14 23:08 
GeneralRe: destroy session after sometime Pin
Jassim Rahma4-May-14 23:11
Jassim Rahma4-May-14 23:11 
AnswerRe: destroy session after sometime Pin
Kornfeld Eliyahu Peter4-May-14 23:17
professionalKornfeld Eliyahu Peter4-May-14 23:17 
GeneralRe: destroy session after sometime Pin
Jassim Rahma4-May-14 23:23
Jassim Rahma4-May-14 23:23 
AnswerRe: destroy session after sometime Pin
Kornfeld Eliyahu Peter4-May-14 23:27
professionalKornfeld Eliyahu Peter4-May-14 23:27 
AnswerRe: destroy session after sometime Pin
Eric 5716-Jun-14 10:08
Eric 5716-Jun-14 10:08 
QuestionUTC_TIMESTAMP to local date time Pin
Jassim Rahma3-May-14 5:01
Jassim Rahma3-May-14 5:01 
Questionhow to deal with bool? Pin
Jassim Rahma3-May-14 4:57
Jassim Rahma3-May-14 4:57 
Hi,

I have the following code to check if the user is_administrator then show the two menu items, otherwise of course it won't show... kindly simple! but the problem is.... when I uploaded the pages to my web host, even if the user is not administrator the menu items are shown! the value for is_administrator in MySQL is a bit = 0 but when I do a var_dump I get bool(true) although I get the correct var_dump and behavior on my local pc string(1) "0"

this is the menu items:

PHP
<?php  if ((bool)$_SESSION["blended_learning_is_administrator"] = true) { ?>
<tr><td><button id="btnManageUsers" type="button" style="width: 100%;">Manage Users</button></td></tr>
<tr><td><button id="btnNewUser" type="button" style="width: 100%;">New User</button></td></tr>
<?php } ?>

and this is the is_administrator:

PHP
while ($mysql_row = $mysql_query->fetch())
{
    $_SESSION["blended_learning_user_name"] = $mysql_row["user_name"];
    $_SESSION["blended_learning_is_administrator"] = $mysql_row["is_administrator"];

    exit(header("Location: " . $_SESSION["blended_learning_domain_name"] . "mypage"));
}        



Technology News @ www.JassimRahma.com

AnswerRe: how to deal with bool? Pin
vbmike3-May-14 8:15
vbmike3-May-14 8:15 
AnswerRe: how to deal with bool? Pin
Daniel Lieberwirth (BrainInBlack)4-May-14 11:25
professionalDaniel Lieberwirth (BrainInBlack)4-May-14 11:25 
Questionwhich distribution is best for my online project? Pin
Jassim Rahma2-May-14 13:57
Jassim Rahma2-May-14 13:57 
AnswerRe: which distribution is best for my online project? Pin
Peter Leow2-May-14 15:41
professionalPeter Leow2-May-14 15:41 
Questioncheck email is real or not? Pin
saeed rajabi30-Apr-14 6:02
saeed rajabi30-Apr-14 6:02 
AnswerRe: check email is real or not? Pin
Daniel Lieberwirth (BrainInBlack)4-May-14 11:30
professionalDaniel Lieberwirth (BrainInBlack)4-May-14 11:30 
GeneralRe: check email is real or not? Pin
xiaoqiangdiandian27-Jun-14 21:54
xiaoqiangdiandian27-Jun-14 21:54 
GeneralRe: check email is real or not? Pin
Daniel Lieberwirth (BrainInBlack)28-Jun-14 0:53
professionalDaniel Lieberwirth (BrainInBlack)28-Jun-14 0:53 
Questionneed help with php parse error Pin
Izu Great19-Apr-14 10:43
professionalIzu Great19-Apr-14 10:43 
AnswerRe: need help with php parse error Pin
Richard MacCutchan19-Apr-14 22:24
mveRichard MacCutchan19-Apr-14 22:24 
Questionphp receive sms Pin
greato716-Apr-14 1:30
greato716-Apr-14 1:30 
AnswerRe: php receive sms Pin
Richard MacCutchan16-Apr-14 6:58
mveRichard MacCutchan16-Apr-14 6:58 
Questionreading word/pdf documents Pin
Padma4u7-Mar-14 1:46
Padma4u7-Mar-14 1:46 
QuestionPHP Permissions issue with FTP_PUT Pin
Rottwild24-Feb-14 2:41
professionalRottwild24-Feb-14 2:41 
Questioni need script that record audio and video of the user and give me the uploaded file link Pin
TheSniper10520-Feb-14 2:52
professionalTheSniper10520-Feb-14 2:52 
Questionhow to edit "alias" and "directory" in httpd.conf in Wampserver 2.4? Pin
babak11105-Feb-14 2:29
babak11105-Feb-14 2:29 
QuestionPHP Google calendar Pin
JR21229-Jan-14 21:29
JR21229-Jan-14 21:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.