묻고답하기

우선 밑에 홈페이지 주소로 들어가 보시고 작동되는지 확인해 보세요..ㅡㅡ
( http://reipin.hostmoa.net/ )

다른 곳에서 조언듣고 수정해봤는데도 안되네요..;
어디가 틀렸는지 봐주세요..ㅡㅡ 초보라 잘 모르겠네요...

목적은 두가지의 페이지를 방문자가 선택해서 들어가는 것인데
이 선택을 쿠키에 저장해서 다음에 들어올때는 선택이 필요 없게끔 하는 건데요..

구조는 index.html에서 meta태그로 0.1초만에 이동 한 다음에
confirm.php로 이동합니다. 그 다음에 특정 쿠키가 존재하는지 아닌지를 판단해서
존재 한다면 intocookie.php로 이동하고, 없다면 choose.php로 이동해서 두가지 중
하나를 선택하는 겁니다. 선택하는 form에서 쿠키에 저장 할것인지 안할것인지 선택하는
checkbox도 있구요,
너무 복잡한가요...? 그림을 그려서..

confirm.php ─>쿠키가 존재하지 않을경우 : choose.php ─>"html"을 선택할 경우 : htmlindex.php
│                                                                  └>"flash"를 선택할 경우 : flashindex.php

└>쿠키가 존재할 경우 : intocookie.php ─>쿠키에 "flash"로 기록되있는경우 : flashindex.php
                                           └>쿠키에 "html"로 기록되있는 경우 : htmlindex.php

.....ㅡㅡ역시나 복잡하군요... 하여튼.. 소스는 아래와 같습니다.


confirm.php
----------------------------------------------------------------------------
<?
        //set(), get(), delete()메쏘드를 class.cookie.php에서 정의하여 불러온다.
        require_once("class.cookie.php");

        //쿠키값을 가져와 확인함. 없다면 선택페이지로 이동
        if (!$savecookie)//쿠키값이 없다면,
        {
                //쿠키값이 없으면, 선택하는 페이지로 이동
                Header("Location: choose.php") ;
        }
        else {
                //있다면, 해당페이지로 이동하기
                Header("Location: intocookie.php") ;
        }
?>
----------------------------------------------------------------------------


choose.php
----------------------------------------------------------------------------
<html>

<form action="intoform.php" method="post">

        <!'flash로 들어갈 것인지 html로 들어갈 것인지 선택>
        <input type="radio" name="choose" value="flash" checked> Flash를 포함한 페이지 <br>
        <input type="radio" name="choose" value="html">Flash가 없는 페이지 <br>

        <!'쿠키로 저장할 것인가 지정>
        <input type="checkbox" name="savecookie" value="savecookie"> 다음에 방문하실때에도 이 선택을..? <br>

        <!'폼 데이터로 전송>
        <input type="submit" value="들어가기">  
        <input type="reset">
</form>
</html>
----------------------------------------------------------------------------


intocookie.php
----------------------------------------------------------------------------
<?php
        //set(), get(), delete()메쏘드를 class.cookie.php에서 정의하여 불러온다.
        require_once("class.cookie.php");

        //해당 쿠키값을 가져와서 $choose에 대입
        //$choose = Cookie::get("choose");

        //쿠키값을 확인함. flash인지 html인지에 따라서 각 해당 페이지로 이동
        //쿠키값에서 flash선택을 하였을 경우 해당페이지로 이동
        if($choose == "flash")
        {
                Header("Location:flashindex.php") ;
        }
        //쿠키값에서 다른 선택(html)을 하였을 경우 해당 페이지로 이동
        else if($choose=="html")
        {
                Header("Location:htmlindex.php") ;
        }
?>
----------------------------------------------------------------------------


intoform.php <- 이 부분이 상당히 의심이 가는부분 입니다요....ㅡㅡ
----------------------------------------------------------------------------
<?php
require_once("class.cookie.php");
if ($savecookie=="savecookie")
{
        setcookie("savecookie",$savecookie,time() + 60,"/");
        setcookie("choose",$choose,"time() + 60","/");

        if($choose=="flash")
        {
                Header("Location: flashindex.php") ;
        }
        else if ($choose=="html")
        {
                Header("Location: htmlindex.php") ;
        }
}
else
{
        if ($choose=="flash")
        {
                Header("Location: flashindex.php") ;
        }
        else if ($choose=="html")
        {
                Header("Location: htmlindex.php") ;
        }
}
?>
----------------------------------------------------------------------------


flashindex.php
----------------------------------------------------------------------------
<html>
<head>
<title>시안</title>
</head>
<BODY BGCOLOR=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<center>
<table width=750 height=100% border=0 cellspacing=0 cellpadding=0>
        <tr>
                <td bgcolor=#5A66A3> flash</td>
        </tr>
</table>
</center>
</body>
</html>
----------------------------------------------------------------------------


flashindex.php
----------------------------------------------------------------------------
<html>
<head>
<title>시안</title>
</head>
<BODY BGCOLOR=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<center>
<table width=750 height=100% border=0 cellspacing=0 cellpadding=0>
        <tr>
                <td bgcolor=#5A66A3> html</td>
        </tr>
</table>
</center>
</body>
</html>
----------------------------------------------------------------------------


이상입니다..;;
별것 아닌 내용인데 파일은 이렇게 많아서야..ㅡㅡ;;;

부탁 드립니다..ㅠㅠ
* zero님에 의해서 게시물 이동되었습니다 (2002-08-17 21:19)
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
JAYLEEKOREA 이 게시판 좀 알려주세요~ [2] file 2015.11.05 by JAYLEEKOREA
해운대살고싶다 클라우드플레어 질문좀 캐쉬설정하는거 [1] 2015.11.05 by AJKJ
불꽃남자cc4e1 게시판 분류별(카테고리)로 설명 넣기 file  
불꽃남자cc4e1 이미지 팝업 방법  
mc뷰 누리고 쇼핑몰을 사용중입니다. 하나만 질문하겠습니다.  
현욱 안녕하세요 게시판관련하여 질문드립니다 file  
tonyhan xpress engine 설치하는데 DB 에서 진행이 안됩니다 [2] file 2015.11.04 by tonyhan
디자이너29270 게시판 파일첨부 클릭해도 반응이 [1] 2015.11.04 by 수용맘~*
쇼이 사이트 게시판(메뉴) 글씨 크기를 줄이고 싶어요 ㅠㅠ [1] file 2015.11.04 by 수용맘~*
비비로비로 회원가입시 특정메일링만 가입하게 어떻게 하나요? [1] 2015.11.04 by 퍼니엑스이
초희67 xe 1.4x 에서 1.7.11 로 데이터이전이 안되는데요...^^ [4] 2015.11.04 by 초희67
상해파 rssboard에서 insertDocument에 값이 안들어가는 문제 [1] 2015.11.04 by gonom
하프하프 헤더스크립트 질문입니다! file  
Golden-mean 모바일 자동비밀글 소스  
김쪼도사 팝업 관리 애드온의 닫기 버튼 오류 file  
비누남어 XEition 수정 레이아웃 bootstrap 적용여부?  
김햄C 포인트 중복 차감 오류 [2] 2015.11.04 by 김햄C
난나야9 관리자화면 회원관리에서 관리자계정 안보이게 하는 방법 [2] 2015.11.04 by 난나야9
해악사마 설문조사 참여시 페이지 새로고침 안되게 하는 법  
뵤로뤙 게시판 본문 보기에 전화번호 표기하고싶어요.