Create index page of project 1

회원이 로그인한 상태이면 로그아웃 링크가 표시되며, 로그아웃한 상태이면 회원가입과 로그인링크가 보이는 페이지를 생성하겠습니다.

/htdocs/myProject/index.php

<?php
    include "./include/session.php";

    $isSignInCheck = false;
    if(isset($_SESSION['ses_userid'])){
        $isSignInCheck = true;
    }
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>COREASUR SignUp Page</title>
</head>
<body>
<div id="wrap">
    <div id="container">
<?php
    if($isSignInCheck) {
?>
        <a href='/myProject/member/signOut.php'>sign out</a>
<?php
    } else {
?>
        <a href='/myProject/member/signUpForm.php'>sign up</a>
        <a href='/myProject/member/signInForm.php'>sign in</a>
<?php
    }
?>
    </div>
</div>
</body>
</html>

atom

php image

please test it.

run & check signUp page
url : http://localhost/myProject/index.php

php image

project 1 end. ^-^*