- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
32 lines
742 B
PHP
32 lines
742 B
PHP
<?php
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/session.php");
|
|
|
|
$id=$_REQUEST["id"];
|
|
$pass=$_REQUEST["pass"];
|
|
$name=$_REQUEST["name"];
|
|
$regist_day=date("Y-m-d H:i:s");
|
|
|
|
require_once("../lib/mydb.php");
|
|
$pdo = db_connect();
|
|
try {
|
|
$pdo->beginTransaction();
|
|
$sql="update chandj.member set pass=? where id=?";
|
|
$stmh=$pdo->prepare($sql);
|
|
$stmh->bindvalue(1,$pass,PDO::PARAM_STR);
|
|
$stmh->bindvalue(2,$id,PDO::PARAM_STR);
|
|
|
|
$stmh->execute();
|
|
$pdo->commit();
|
|
|
|
if($_SESSION["division"] == '경동')
|
|
header ("Location:/index.php");
|
|
else
|
|
header ("Location:/index1.php");
|
|
exit;
|
|
|
|
} catch (PDOException $Exception) {
|
|
$pdo->rollBack();
|
|
print "오류: ".$Exception->getMessage();
|
|
}
|
|
?>
|