-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteams.php
30 lines (24 loc) · 865 Bytes
/
teams.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
<center>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/jordan.css">
<?php
require_once('../../mysqli_connect.php');
$query = "SELECT TeamName, TeamNum FROM teams";
$response = @mysqli_query($dbc, $query);
if($response){
echo '<table>';
while($row = mysqli_fetch_array($response)){
echo '<tr><td><a href = "./teamdetails.php?teamNum='. $row['TeamNum'] .'">' .
$row['TeamNum']. ' '.
$row['TeamName']. '</a></td></tr>';
}
echo '</table>';
}else{
echo "Couldn't issue database query";
echo mysqli_error($dbc);
}
mysqli_close($dbc);
?>
<a href = "index.php">Back</a>
</center>