Jump to content

Archived

This topic is now archived and is closed to further replies.

Plazman65

session variables.

Recommended Posts

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

Share this post


Link to post
Share on other sites

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


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

Share this post


Link to post
Share on other sites

×

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.