Files
sam-kd/member/check_level.php

28 lines
908 B
PHP
Raw Permalink Normal View History

<meta charset="UTF-8">
<?php $id = $_REQUEST["id"];
require_once("../lib/mydb.php");
$pdo = db_connect();
try{
$sql = "select * from chandj.member where id = ? ";
$stmh = $pdo->prepare($sql);
$stmh->bindValue(1,$id,PDO::PARAM_STR);
$stmh->execute();
$row = $stmh->fetch(PDO::FETCH_ASSOC); // 위의 형식이 일반적으로 DB 정보를 가져올때 사용하는 방식이다.
$level = $row["level"];
} catch (PDOException $Exception) {
print "오류: ".$Exception->getMessage();
}
if($level>5){
print "가입승인이 필요합니다. 본사 관리자에게 문의하세요.<p>";
print "<center> <input type=button value=창닫기 onClick=self.close()> </center>" ;
<meta http-equiv="refresh" content="1" url="../login/logout.php">
}
}
header("Location:/index.php");
?>