Hi,
I having problem to fix this problem. Already search for related thread, but cannot find a solution. The case is like this. I have 2 system that intergrate each other. Let assume as system A and B. User need to login from system A and can use system B if user have authority.
For the session, on 1st page of system B, the value can be display successfully, but having problem when jump to other page. I already declare session_start() on every page. But still not work.
Here the code:
check.php (assign session)
<?
session_start();
$_SESSION['nama']= "";
$_SESSION['id']= "";
$login=$_GET["login"];//value pass from system A
$pwd=$_GET["pwd"];//value pass from system A
$query1="SELECT * FROM login WHERE password='".$login."'";
$result = mysql_query($query1);
while ($row = mysql_fetch_assoc($result)) {
$_SESSION['nama']= $row['nama'];
$_SESSION['id']= $row['userid'];
$_SESSION['cms']= $row['groupcms'];
header("location:index.php");
exit;
}
header("location:salah.php");
exit;
mysql_free_result($result);
?>
Having problem when call from sub page that have another sub page. The sub page i had put below code to automatically return to previous page.
print "<meta http-equiv=\"refresh\" content=\"5;URL=foto_cawangan_cms.php\">";
When return the session value totally blank.Any idea?
Really appreciate your respond and idea. Thanks.