세션 질문입니다. 정보
세션 질문입니다.본문
<?php
session_start();
$_SESSION["ss_mb_id"]
if (empty($_SESSION["ss_mb_id"]))
{
echo "<script>
alert('로그인 후 사용가능합니다');
location.replace('주소');
</script>";
}
include_once("./_common.php"); // _common.php
include_once("$g4[path]/_head.php");
내용
include_once("$g4[path]/_tail.php");
?>
세션 설정방법을 잘 모르겠습니다.
위의 내용대로 세션을 설정했는데 if (empty($_SESSION["ss_mb_id"])) 에서 에러가 납니다.
그누보드에서 세션설정하는 방법이나 소스 아시는분 답변 부탁드릴께요
session_start();
$_SESSION["ss_mb_id"]
if (empty($_SESSION["ss_mb_id"]))
{
echo "<script>
alert('로그인 후 사용가능합니다');
location.replace('주소');
</script>";
}
include_once("./_common.php"); // _common.php
include_once("$g4[path]/_head.php");
내용
include_once("$g4[path]/_tail.php");
?>
세션 설정방법을 잘 모르겠습니다.
위의 내용대로 세션을 설정했는데 if (empty($_SESSION["ss_mb_id"])) 에서 에러가 납니다.
그누보드에서 세션설정하는 방법이나 소스 아시는분 답변 부탁드릴께요
댓글 전체
bbs/login_check.php 에
// 회원아이디 세션 생성
set_session('ss_mb_id', $mb[mb_id]);
에서 세션 기록 합니다.
print_r(."session : ".$_SESSION["ss_mb_id"]);
해서 값이 출력되는 지 확인하세요.
// 회원아이디 세션 생성
set_session('ss_mb_id', $mb[mb_id]);
에서 세션 기록 합니다.
print_r(."session : ".$_SESSION["ss_mb_id"]);
해서 값이 출력되는 지 확인하세요.
$_SESSION["ss_mb_id"] <-- " ; " 이게 빠지신건 아닐련지요

$_SESSION["ss_mb_id"] 이건 왜 선언이 되어 있는거죵?