-
Notifications
You must be signed in to change notification settings - Fork 0
/
member_insert.php
33 lines (26 loc) ยท 1.06 KB
/
member_insert.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 = $_POST["id"];
$pass = $_POST["pass"];
$name = $_POST["name"];
$email1 = $_POST["email1"];
$email2 = $_POST["email2"];
$email = $email1."@".$email2;
$univ = $_POST["univ"];
$department = $_POST["dpt"];
$faculty = $_POST["fac"];
$student_num = $_POST["stu_num"];
$phone_num = $_POST["phone_num"];
$birth = $_POST["birth"];
$gender = $_POST["gen"];
$regist_day = date("Y-m-d (H:i)"); // ํ์ฌ์ '๋
-์-์ผ-์-๋ถ'์ ์ ์ฅ
$con = mysqli_connect("localhost", "user1", "12345", "sample");
$sql = "insert into members(id, pass, name, email, regist_day, univ, department, faculty, student_num, phone_num, birth, gender, level, point) ";
$sql .= "values('$id', '$pass', '$name', '$email', '$regist_day', '$univ', '$department', '$faculty', '$student_num', '$phone_num', '$birth', '$gender', 9, 0)";
mysqli_query($con, $sql); // $sql ์ ์ ์ฅ๋ ๋ช
๋ น ์คํ
mysqli_close($con);
echo "
<script>
location.href = 'index.php';
</script>
";
?>