-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.php
70 lines (53 loc) · 1.3 KB
/
list.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
<?php
$conn = mysql_connect('localhost','root','root','erp');
if(! $conn ) {
die('Could not connect: ' . mysql_error());
}
$sql = 'SELECT pname, email,mobile FROM slogin';
mysql_select_db('erp');
$retval = mysql_query($sql,$conn);
if(! $retval ) {
die('Could not get data: ' . mysql_error());
}
echo
"<h2>Registered Student </h2>";
echo
"<table border='3'>
<tr>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
</tr>";
while($row = mysql_fetch_array($retval, MYSQL_ASSOC)) {
echo
"<tr>
<td>{$row['name']}</td>
<td>{$row['email']}</td>
<td>{$row['mobile']}</td>
</tr>\n";
}
echo "</table>";
/*$sql = 'SELECT pname, email,mobile FROM flogin';
mysql_select_db('login_form');
$retval = mysql_query($sql,$conn);
if(! $retval ) {
die('Could not get data: ' . mysql_error());
}
echo "<h2>Faculty Info</h2>";
echo" <table border='3'>
<tr>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
</tr>" ;
while($row = mysql_fetch_array($retval, MYSQL_ASSOC)) {
echo
"<tr>
<td>{$row['pname']}</td>
<td>{$row['email']}</td>
<td>{$row['mobile']}</td>
</tr>\n";
}
echo "</table>";*/
mysql_close($conn);
?>