-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_mem.php
More file actions
36 lines (29 loc) · 925 Bytes
/
add_mem.php
File metadata and controls
36 lines (29 loc) · 925 Bytes
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
34
35
36
<?php
include('db_conn.php');
?>
<?php
$mem_id = $_POST['mem_id'];
$mem_name = $_POST['mem_name'];
$email = $_POST['email'];
$mem_type = $_POST['mem_type'];
$query10 = "SELECT * FROM `member` WHERE `mem_id`='$mem_id'";
$result10 = mysql_query($query10);
$count10 = mysql_num_rows($result10);
if($count10!=0){
$message = "Entry already exist";
echo "<script type='text/javascript'>window.confirm('$message');</script>";
/* exit("<script type='text/javascript'>alert('$message');</script>"); */
/* header('location:add_lab.html'); */
echo "<script type='text/javascript'>window.location.href=\"add_mem.html\";</script>";
die();
}
else
{
$query3 = "INSERT INTO member (mem_name,email,mem_type,reg_date) VALUES('$mem_name','$email','$mem_type',NOW())";
$result3 = mysql_query($query3);
if($result3)
{
header('location:add_mem.html');
}
}
?>