-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew1.php
71 lines (70 loc) · 1.06 KB
/
new1.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
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$dbname = 'seminar_wizard';
$indexno = $_GET['indexno'];
echo $indexno;
$conn = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname);
if(!$conn)
{
die('connection not formed'.mysqli_error());
}
echo 'connected successfully<br>';
$sql="SELECT * FROM seminar_details where college_id='$indexno'";
$retval=mysqli_query($conn,$sql);
?>
<table>
<tr>
<th>NAME</th>
<th>ID</th>
<th>Speaker ID</th>
<th>College ID</th>
<th>Subject</th>
<th>Cost</th>
</tr>
<?php
if(mysqli_num_rows($retval) > 0)
{
while($row = mysqli_fetch_assoc($retval))
{
?>
<tr><td>
<?php
echo $row["seminar_name"];
?>
</td>
<td>
<?php
echo $row["seminar_id"]."<br>";
?>
</td>
<td>
<?php
echo $row["speaker_id"]."<br>";
?>
</td>
<td>
<?php
echo $row["college_id"]."<br>";
?>
</td>
<td>
<?php
echo $row["seminar_subject"];
?>
</td><td>
<?php
echo $row["cost"];
?>
</td>
</tr>
<?php
}
}
else{
echo "0 results";
}
mysqli_close($conn);
?>
</table>