-
Notifications
You must be signed in to change notification settings - Fork 0
/
test3.php~
29 lines (27 loc) · 1 KB
/
test3.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
<?php
$con = mysqli_connect('localhost','root','root','vlabs_database');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
$a=$_GET['id'];
$b=substr($a,1);
$c=strrev($b);
$d=substr($c,1);
$e=strrev($d);
mysqli_select_db($con,"vlabs_database");
//$sql="SELECT * FROM labs a, disciplines b, institutes c WHERE a.institute_id=c.id and a.discipline_id=b.id and lab_name='$e'";
$sql= "SELECT * from labs where developer IN (SELECT email_id FROM developers WHERE developer_name ='$e')";
$result = mysqli_query($con,$sql);
$two = mysqli_num_rows($result);
//echo "Total Number Of Institutes:".$two;
echo "<br><br>";
echo "<table border='1'>";
echo "<h4>Labs Developed by <font color='blue'>$e</font> : " .$two."</h4>";
echo "<tr><td>LAB ID</td><td>LAB NAME</td></tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr align='left'><td>$row[lab_id]</td><td><a href='test1.php?id=\"$row[lab_name]\"' value=\"$row[lab_name]\">".$row[lab_name]."</a></td></tr>";
}
echo "</table><br><br>";
mysqli_close($con);
?>