-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
executable file
·35 lines (29 loc) · 781 Bytes
/
Copy pathtest.php
File metadata and controls
executable file
·35 lines (29 loc) · 781 Bytes
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
<?php
include ("brennerfile.php");
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT association FROM contributor WHERE association LIKE '%Google%'";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
echo "<table border='1'>
<tr>
<th>Rank</th>
<th>Contributor</th>
</tr>";
while($row = mysqli_fetch_assoc($result)) {
echo "<tr>";
echo "<td>" . '1'. "</td>";
echo "<td>" . $row['association'] . "</td>";
$brenner = $row['association'];
echo "</tr>";
}
} else {
echo "0 results";
}
mysqli_close($conn);
?>