-
Notifications
You must be signed in to change notification settings - Fork 1
/
add1.php
89 lines (62 loc) · 1.54 KB
/
add1.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<html>
<head> <link rel="stylesheet" type="text/css" href="style2.css"/></head>
<body>
<center><br><br>
<h1> </h1>
<?php
$connection=mysql_connect("localhost","root");
mysql_select_db("budget");
$sqlquery="select count(*) as count from register where stat='PENDING'";
$result=mysql_query($sqlquery);
while($req=mysql_fetch_assoc($result))
{
$count= $req['count'];
}
for($i=1;$i<=$count;$i++)
{
if(isset($_POST["$i"]))
{
$empid=$_POST["$i"];
$sql="select * from register where emp='$empid'";
$record=mysql_query($sql);
echo "RECENTLY ADDED USER IS : ";
?> <center><br><br>
<table width ="800" border="1" cellpadding="5" cellspacing="1">
<tr>
<th>EMPLOYEE ID</th>
<th>FIRST NAME</th>
<th>LAST NAME</th>
<th>DATE OF BIRTH</th>
<th>GENDER</th>
<th>USERNAME</th>
<th>EMAIL</th>
<th>PASSWORD</th>
<th>MOBILE NUMBER</th>
<th>USER TYPE</th>
<tr>
</BR></BR>
<?php
while($req=mysql_fetch_assoc($record))
{
echo "<tr>";
echo "<td>".$req['emp']."</td>";
echo "<td>".$req['fname']."</td>";
echo "<td>".$req['lname']."</td>";
echo "<td>".$req['dob']."</td>";
echo "<td>".$req['gender']."</td>";
echo "<td>".$req['uname']."</td>";
echo "<td>".$req['email']."</td>";
echo "<td>".$req['pwd']."</td>";
echo "<td>".$req['mno']."</td>";
echo "<td>".$req['utype']."</td>";
echo "</tr>";
}
$sql="UPDATE register
SET stat='MEMBER'
WHERE emp='$empid';";
$result=mysql_query($sql,$connection);
}
}
?>
</body>
</html>