the variable $user->getLogin() needs to be transferred.
PAGE 1
Code: Select all
<script language="Javascript">
function move() {
window.location = 'http://schedfox.com/employee/test.php'
}
</script>
<?php include("include/configure.inc.php");
include(COM_PATH."admin/user.inc.php");
PostgresDriver::Open();
if(isset($_REQUEST['new'])) {
$user = User::findByExternal($_REQUEST['new']);
}
if($user->getID()>0)
{
//good
setcookie("sessionid", $user->getLogin(), time() + 3600);
echo "<SCRIPT LANGUAGE='javascript'>move();</SCRIPT>";
}
else{
exit(1);
}
?>
Code: Select all
<?php
if (isset($HTTP_COOKIE_VARS['sessionid'])){
echo "Welcome " . $HTTP_COOKIE_VARS['sessionid'] . "!<br />";
}
else
echo "Welcome guest!<br />";
?>
still it doesn't work.
Any ideas guys....
Thanks in Advance.