- Messages
- 5,257
- Reaction score
- 97
- Points
- 48
I should know this, but how do you echo a session id in PHP?
<?PHP
//hopefully you've started your session....
echo "Session ID =. $_SESSION['sessionname'];
?>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = "forum/";
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('');
$username = request_var('username', '');
$count = request_var('count', 0);
$submit = request_var('submit', '');
$done = false;
if($user->data['is_registered'])
{
$ses_id = session_id();
$res = "<a href=\"" . $phpbb_root_path . "ucp.php?mode=logout&sid=" . $sid . "\">Logout [" . $user->data['username'] . "]</a>";
}
else
{
$res = "<a href=\"" . $phpbb_root_path . "ucp.php?mode=login\">Login</a>";
}
?>
<?php
include("includes.php");
//...
include("phpbb.php");
echo $res;
?>
<?php
//security code - removed
session_start();
function startPige()
{
echo "<html><head><title>The Paper Hub</title></head><body>
//...";
}
function endPige()
{
echo "//...
</body></html>";
}
?>
leafypiggy: sorry, doesn't work
supajason: neither does yours
phpasks: nor yours
I think it must be me, not you...