-
Notifications
You must be signed in to change notification settings - Fork 0
/
insertPro.php
executable file
·33 lines (29 loc) · 977 Bytes
/
insertPro.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
$id = $_REQUEST["id"];
$pass = $_REQUEST["pass"];
$name = $_REQUEST["name"];
$position = $_REQUEST["position"];
$hp1 = $_REQUEST["hp1"];
$hp2 = $_REQUEST["hp2"];
$hp3 = $_REQUEST["hp3"];
$hp = $hp1."-".$hp2."-".$hp3;
require_once("../lib/MYDB.php");
$pdo = db_connect();
try{
$pdo->beginTransaction();
$sql = "insert into interlaw88.manager VALUES(?, ?, ?, ?, ?, now())";
$stmh = $pdo->prepare($sql);
$stmh->bindValue(1, $id, PDO::PARAM_STR);
$stmh->bindValue(2, $pass, PDO::PARAM_STR);
$stmh->bindValue(3, $name, PDO::PARAM_STR);
$stmh->bindValue(4, $position, PDO::PARAM_STR);
$stmh->bindValue(5, $hp, PDO::PARAM_STR);
$stmh->bindValue(6, $regist_day, PDO::PARAM_STR);
$stmh->execute();
$pdo->commit();
header("Location:http://interlaw88.cafe24.com/index.php");
} catch (PDOException $Exception) {
$pdo->rollBack();
print "오류: ".$Exception->getMessage();
}
?>