-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin_sec_update.php
75 lines (59 loc) · 2.03 KB
/
admin_sec_update.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<div class="hidden">
<?php //include('dbcon.php');?>
</div>
<?php
$conn = mysql_connect("localhost","root","","sas_db");
mysql_select_db("sas_db");
$sid = $_POST['txtId'];
$fn = $_POST['txtFname'];
$mn = $_POST['txtMname'];
$ln = $_POST['txtLname'];
$email = $_POST['txtSEmail'];
$con = $_POST['txtSNumber'];
$gen = $_POST['txtSGender'];
$pn = $_POST['txtProject'];
$grp = $_POST['txtsGroup'];
$houseno = $_POST['txtHnumber'];
$curradd = $_POST['currsAdd'];
$peradd = $_POST['persAdd'];
$blkno = $_POST['txtBlock'];
$proff = $_POST['txtProfesstion'];
$type = $_POST['ProjectType'];
$prno = $_POST['txtPnumber'];
$ifflt = $_POST['txtIfFlat'];
$city = $_POST['txtsCity'];
$stat = $_POST['txtsState'];
error_reporting(E_ERROR | E_PARSE);
$select_query = mysql_query("select * from secretary where fname='$fn' and sid!='$sid'");
$select_result = mysql_query($select_query,$conn);
if(mysql_num_rows($select_result)<=0)
{
$query = "Update secretary set fname='$fn', mname='$mn', lname='$ln' ,semail='$email' ,sconact_no='$con' ,sgender='$gen',sproject = '$pn',sgroup ='$grp',shouse_no='$houseno',sblock='$blkno',scurr_add='$curradd',sper_add='$peradd',s_profession='$proff',sparkingno='$prno',property_type='$type',sif_flat='$ifflt',city='$city',state='$stat' where sid='$sid'";
$resultt = mysql_query($query);
if(!$resultt)
{
echo "<h1>Secretary Update Failed...!</h1>";
}
else
{
echo "<h1>Secretary Update Successful...!</h1>";
header('location: view_all_members.php');
}
}
else
{
echo "<h1>Event Already Exist.</h1>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>secretary Update</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<div class="hidden">
</div>
</head>
<body>
</body>
</html>