Jump to content


Photo

session variables.


  • Please log in to reply
1 reply to this topic

#1 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 23 February 2006 - 05:10 PM

Hi all, I need a little help Im attempting to put in a loging status on my pages, I am using server behaviors in dreamweaver.. and I am new, very new. So I was very ecstatic when I got it to work but now I cant put it in the tables. I tried moving,

echo "Welcome ". $_SESSION['MM_Username'] ."!
YOU ARE CURRENTLY LOGGED IN!<br /><br />";

to the cell where I want it. by clicking on the cell,going to code view and pasting it there. I get nothing. I know its something simple like a " or something.. Im new at this so I am not even close to claiming I know what I am doing..thanks, I attached what is currently on the page so you can see what I have now, that works it just puts it above the header..
Text
Attach Code

<?php require_once('../Connections/jobs.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}

// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);

$logoutGoTo = "thankyou.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
echo "Welcome ". $_SESSION['MM_Username'] ."!
YOU ARE CURRENTLY LOGGED IN!<br /><br />";

Any ideas? Thanks, Michelle

#2 Plazman65

Plazman65
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 23 February 2006 - 11:51 PM


<?php echo "Welcome ". $_SESSION['MM_Username'] ."!
YOU ARE CURRENTLY LOGGED IN!<br /><br />" ?>;


this is what i needed forgot the <?php
duh'




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users