![]() |
Admin 3/20/2006 |
Uwe, if($_SESSION["UserID"]) header("Location: menu.php"); exit(); |
D
|
drh 3/21/2006 |
Hi. I am new to php and phprunner. This is exactly what I need to do. So I generated the events.php script as follows: |
|
Pfeiffer author 3/22/2006 |
Uwe, you can try to change following:
Hi. I am new to php and phprunner. This is exactly what I need to do. So I generated the events.php script as follows: <?php^M function LoginOnLoad() {^M $_SESSION["UserID"] = $_COOKIE["PHPSESSID"];^M $_SESSION["AccessLevel"] = "User";^M $_SESSION["OwnerID"] = $_SESSION["UserID"];^M ^M print $_COOKIE["PHPSESSID"]; if($_SESSION["UserID"]){^M header("Location: menu.php");^M exit;^M } }^M ^M ^M ?> and menu.php file like such: <?php ini_set("display_errors","1"); ini_set("display_startup_errors","1"); session_start(); set_magic_quotes_runtime(0); include("include/dbcommon.php"); print "@$_SESSION["UserID"]"; if(!@$_SESSION["UserID"]) { header("Location: login.php"); return; } ?> However, when I run the script, I get the following errors: Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/dave.local.solution-group.com/httpdocs/include/events.php:8'>dave.local.solution-group.com/httpdocs/include/events.php:8) in /var/www/vhosts/dave.local.solution-group.com/httpdocs/include/events.php on line 11 Can anyone tell me whats wrong. Did this work for you Uwe? Thanks in advance. Dave |
![]() |
Admin 3/22/2006 |
Uwe, function LoginOnLoad() { $_SESSION["UserID"] = $_COOKIE["gemseuser"]; $_SESSION["AccessLevel"] = "User"; $_SESSION["OwnerID"] = $_SESSION["UserID"] if($_SESSION["UserID"]) header("Location: menu.php"); exit(); } |
![]() |
Admin 3/22/2006 |
Dale, |